| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Tips Categories:
Contribute?What's New?
What's Hot? |
Retrieving Condition records using function modulesBy Bhumika Mahawar, YASH Technologies Many a times I have seen code with Selects on
multiple tables to get the condition table for the given condition type. Here
are a group of Function modules, which serves the same purpose with consistency. The function modules are:
Below is a sample code for getting the condition tables for
the given condition type. Code REPORT ZTEST_COND. * Published at SAPTechnical.COM DATA: gs_t685 type t685, gs_t682i type t682i, gt_t682i type standard table of t682i. " Condition tables CONSTANTS: gc_kappl TYPE kappl VALUE 'CS', " Application gc_kvewe TYPE kvewe VALUE 'A'. " Usage of the condition table ** Get the access sequence for the given condition type CALL FUNCTION 'SD_COND_T685_SELECT' EXPORTING cts_kappl = gc_kappl cts_kschl = 'SAPZ' " Condition Type cts_kvewe = gc_kvewe IMPORTING cts_t685 = gs_t685. **Get the access sequence for the given condition type CALL FUNCTION 'SD_T682I_SINGLE_READ' EXPORTING kvewe_i = gc_kvewe kappl_i = gc_kappl kozgf_i = gs_t685-kozgf " Access sequence TABLES t682i_tab_io = gt_t682i. LOOP AT gt_t682i INTO gs_t682i.
WRITE:/
gs_t682i-kotabnr. " Condition tables
ENDLOOP.
Note: The Condition table that we receive here is just a 3-digit number.
To view the same table in SE11, concatenate this 3-digit number with the
"Usage of the condition table". For example, in this case, if KOTABNR
is 020 the corresponding table in SE11 is "A020".
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||