on 05-13-2008 6:44 AM
Hi EXperts,
I want to add one field to one form.i want to add ekgrp value to the form.for this i want to retrive the data from lips -vbeln and lips-vgbel after that i retrived the data from ekko-ekfrp here the condition is
lips-vgbel = ekko-ekgrp.
i written the subroutine pool for ekko-ekgrp . the code is as follows . please correct the code
PROGRAM ZAN_GOODS_RECEIPT.
*----
TABLES DECLARATION.
tables : likp,lips,ekko,ekpo.
*----
FORM STRUCTURE DECLARATION.
form f_head tables in_tab structure itcsy
out_tab structure itcsy.
data: w_ebeln(10) type c,
w_ekgrp(3) type c.
loop at in_tab.
case in_tab-name.
when 'EKKO-EBELN'.
move in_tab-value to w_ebeln.
endcase.
endloop.
select ekgrp
from ekko
into w_ekgrp
where ebeln = w_ebeln.
endselect.
if sy-subrc ne 0.
endif.
loop at out_tab.
case out_tab-name.
when 'W_EKGRP'.
move w_ekgrp to out_tab-value.
modify out_tab.
endcase.
endloop.
endform.
please add the code for lips also and send it to me
Thanks®ards,
Narasimha.
Hi Narasimha,
U r specifing this condition.I think it's not correct.
lips-vgbel = ekko-ekgrp.
Plz check once.
Regards,
Narasimha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this way...
Ex:
Go through this example
/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>
/:USING &<field name>&
/:CHANGING &<field name1&
/:ENDPERFORM
Then create subroutine pool program and you have to write the code.
FORM ><subroutine name> tables int_cond structure itcsy
outt_cond structure itcsy.
data : value(20), value1(20). "do your own declarations
Read int_cond table index 1.
value = int_cond-value.
value1 = value1 + value.
Read outt_cond table index 1.
outt_cond-value = value1.
Modify outt_cond index 1.
ENDFORM.
Close the thread once your question is answered.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.