on 08-10-2007 1:02 PM
i wrote the following code in program lines of smartform.
DATA:T_KONP TYPE TABLE OF KONP WITH HEADER LINE.
SELECT KNUMH FROM A363 INTO CORRESPONDING FIELDS OF TABLE T_A363
WHERE MATNR = L_XEKPO-MATNR(mat.no in me23n)
AND LIFNR = ZXEKKO-LIFNR.(vendor no. in me23n)
loop at t_a363 into w_a363.(this was placed in loop node).
under loop node in program lines i wrote the following code.
SELECT SINGLE * FROM KONP INTO CORRESPONDING FIELDS OF W_KONP WHERE KNUMH = W_A363-KNUMH.
APPEND W_KONP TO T_KONP.
CLEAR W_KONP.
SORT T_KONP BY KNUMH.
loop at t_konp into w_konp.(this is in loop node).
now i want to loop condition types (kschl) only one time into my header line.
for example if there are 3 records in t_konp containing condition type 'JMOP',i want to fetch only one 'JMOP' for which kbetr is not initial.similarly for other condition types.please suggest how to code , so that i can only retrive all the condition types only one time.
Hi
A363 table will give only one condition type (KNUMH) for the access sequence of Vendor,Material for a PO
for a single KNUMH there will be always a single record only exits in KONP table for a single Condition type(KSCHL)
so there won't be any multiple records for a single KNUMH in KONP
for JOMP condition type.
Like JOMP there will be different condition type records in KONP.
<b>Reward points for useful Answers</b>
Regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI ,
create one more internal table with same structure as t_konp say t_konp1 .
sort t_konp .
delete t_konp[] where kbetr is initial .
loop at t_konp into w_konp .
at new kschl .
move all the fields of t_konp to t_konp1 .
endat .
endloop .
I hope it will work .
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.