Skip to Content
0
Former Member
May 13, 2008 at 05:44 AM

reg.script

20 Views

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&regards,

Narasimha.