‎2008 Oct 23 11:37 PM
Hi!
I need to add new vendors in FK02 with a batch input, but i don't know how to indicate in the code when is more than one vendor.
Example of mi code:
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR' 'LFBK-BVTYP(03)'.
perform bdc_field using 'BDC_OKCODE' '=UPDA'.
perform bdc_field using 'LFBK-BANKS(03)' 'MX'.
perform bdc_field using 'LFBK-BANKL(03)' '0002'.
perform bdc_field using 'LFBK-BANKN(03)' '77788888'.
perform bdc_field using 'LFBK-BVTYP(03)' '3'.
The (03) indicate the position to insert, but if I try with:
data: lin(4).
lin = lin + 1.
perform bdc_field using 'LFBK-BANKN' (lin) itab-bankn.
SAP said: "Field LFBK-BVTYP, not found in loop of the screen SAPMF02K 0130"
Can anybody help me please????
Thanks and regards
Betty
‎2008 Oct 24 3:41 AM
Hi
I think you need the Table Control concept of BDC here. To add more than one vendor the code should be something like this:
Just an Example:
id = 3.
Data: fnam(20) type c.
loop at itab.
concatenate 'RM06E-EPSTP(0' id ')' into fnam.
perform bdc_field using fnam itab-itmcategory.
concatenate 'EKPO-KNTTP(0' id ')' into fnam.
perform bdc_field using fnam TI_STAGING-accassignment.
concatenate 'EKPO-EMATN(0' id ')' into fnam.
perform bdc_field using fnam TI_STAGING-material.
concatenate 'EKPO-TXZ01(0' id ')' into fnam.
perform bdc_field using fnam TI_STAGING-shortxt.
id = id + 1.
endloop.Regards,
Vishwa.
Edited by: Vishwa Sri Hari on Oct 24, 2008 8:11 AM
Edited by: Vishwa Sri Hari on Oct 24, 2008 8:14 AM
‎2008 Oct 24 3:41 AM
Hi
I think you need the Table Control concept of BDC here. To add more than one vendor the code should be something like this:
Just an Example:
id = 3.
Data: fnam(20) type c.
loop at itab.
concatenate 'RM06E-EPSTP(0' id ')' into fnam.
perform bdc_field using fnam itab-itmcategory.
concatenate 'EKPO-KNTTP(0' id ')' into fnam.
perform bdc_field using fnam TI_STAGING-accassignment.
concatenate 'EKPO-EMATN(0' id ')' into fnam.
perform bdc_field using fnam TI_STAGING-material.
concatenate 'EKPO-TXZ01(0' id ')' into fnam.
perform bdc_field using fnam TI_STAGING-shortxt.
id = id + 1.
endloop.Regards,
Vishwa.
Edited by: Vishwa Sri Hari on Oct 24, 2008 8:11 AM
Edited by: Vishwa Sri Hari on Oct 24, 2008 8:14 AM