‎2012 May 07 8:16 AM
HI Friends,
I want select the vendor number ( LFA1-LIFNR) in selection screen. After selecting the vendor number when i execute . I want store the below values into my ztable from vendor master table(LFA1).
The fields are: LFA1-NAME1, LFA1-ORTO1, LFA1-STRAS, LFA1-MCOD1 .
I want insert these particular fields into my ztable when i select the particular vendor number.. How can i do please provide the code. It May be easy. But i dont know this.. Please help me frnds.
Thanks and Regards,
Linganathan
Moderator Message: Basic question. Thread locked.
Message was edited by: Suhas Saha
‎2012 May 07 8:19 AM
‎2012 May 07 8:19 AM
Read the F1 help of the INSERT/MODIFY statements.Many your threads are faq & basic http://scn.sap.com/people/linganathan.k/content. Try to understand the advice given by Moderators.
‎2012 May 07 8:23 AM
select-options: s_lifnr for lifnr.
select lifnr name1orto1stras mcod1into table gt_data from lfa1 where lifnr in s_lifnr.
data: gs_custom type line of 'CUSTOM TABLE',
ls_data like line of gt_data.
Loop at gt_data into ls_data.
move-corresponding ls_data to gs_custom.
insert 'CUSTOM TABLE' from gs_custom.
ENDLOOP.
‎2012 May 07 8:43 AM
ztab-mandt = sy-mandt.
ztab-name1 = itab-name1.
ztab-ort01 = itab-ort01.
ztab-stras = itab-stras.
INSERT ztab.