Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FK02 - Batch Input

Former Member
0 Likes
652

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
458

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

1 REPLY 1
Read only

Former Member
0 Likes
459

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