on 07-03-2009 7:11 AM
Hi good morning,
without modifying print program how we will add single field to output pls provide me code.i have maintain this code in subroutine pool but i was not able to print the value.my requirement is need to print internal order number from ME22N
FORM GET_DATA TABLES input STRUCTURE itcsy
output STRUCTURE itcsy.
DATA:l_aufnr LIKE ekkn-aufnr.
DATA:l_v_ebeln like ekKo-ebeln.
READ TABLE input WITH KEY name = 'ekKo-ebeln'.
l_v_ebeln = input-value.
output-name = L_AUFNR.
SELECT SINGLE aufnr INTO l_aufnr
FROM ekkn
WHERE AUFNR = L_AUFNR.
ENDFORM. "get_DATA
PERFORM GET_DATA IN PROGRAM ZP_MEDRUCK
USING &EKPO-EBELN&
CHANGING &EKKN-AUFNR&
please give me cod how we have to print the value it is very argunt pls help me.
venkee
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think u r doing correctly, but not modifying the out_tab with the new l_aufnr from ekkn..
FORM GET_DATA TABLES input STRUCTURE itcsy
output STRUCTURE itcsy.
DATA:l_aufnr LIKE ekkn-aufnr.
DATA:l_v_ebeln like ekKo-ebeln.
READ TABLE input WITH KEY name = 'EKKO-EBELN'. --->always characters within quotes should be Upper case
IF sy-subrc EQ 0.
l_v_ebeln = input-value.
output-name = L_AUFNR. -
>This should not be here, should be after SELECT & READ of OUTPUT table.
SELECT SINGLE aufnr INTO l_aufnr
FROM ekkn
WHERE AUFNR = L_AUFNR.
IF sy-subrc EQ 0 and l_aufnr is not initial.
READ TABLE output WITH KEY name = 'EKKN-AUFNR'.
output-value = L_AUFNR.
MODIFY output transporting value index sy-tabix.
endif.
endif.
ENDFORM. "get_DATA
PERFORM GET_DATA IN PROGRAM ZP_MEDRUCK
USING &EKPO-EBELN&
CHANGING &EKKN-AUFNR&
Now, u print in FORM..
P1 &EKKN-AUFNR&
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.