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

MB01 BDC HELP

Former Member
0 Likes
1,416

Hi Gurus,

I developed a BDC program for MB01 to post the GR document for a PO but getting the error No batch input data for screen SAPLKACB 0002.

I am getting this error if in run background mode but if i run in the foreground , i am getting the no batch for one of the line item.

I would appreciate if anybody could shade some light on this.

Hi Gurus,

I developed a BDC program for MB01 to post the GR document for a PO but getting the error No batch input data for screen SAPLKACB 0002.

I am getting this error if in run background mode but if i run in the foreground , i am getting the no batch for one of the line item.

I would appreciate if anybody could shade some light on this.

8 REPLIES 8
Read only

Former Member
0 Likes
1,257

>

> Hi Gurus,

>

> I developed a BDC program for MB01 to post the GR document for a PO but getting the error No batch input data for screen SAPLKACB 0002.

Hi nikki vee,

Welcome to SDN,

The Screen SAPLKACB 0002 is for Cost Center, I guess while recording You would have't key in the CostCenter.

perform bdc_dynpro      using 'SAPLKACB' '0002'.
perform bdc_field       using 'BDC_CURSOR'
                              'COBL-KOSTL'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTE'.
perform bdc_field       using 'COBL-KOSTL'
                              'IND4100'.

Main thing in BDC's are how You do recording and its very important too, if could provide me few things which will help you to

solve Your problem.

1. I need wht is your Flat file structure.

2. The procedure how you do recording.

Regards,

Suneel G

Read only

0 Likes
1,257

Thanks for your reply.

I used the option 'simulate background' 'default display' in bdc recording.

We don't have the cost center information so i am not sure how to skip this screen w/o cost center value.

below is file structure

i am using movement type 101 and 543 together.

PO number, scac code, carrier pro number at the header level.

final product with po line number, matnr, qty, batch.

component matnr, qty, batch.

we can have more than one component but only one final product.

Rgds

Nikki

Read only

0 Likes
1,257

Hi,

You can't Skip the Cost Center Screen as that will be in configuration level, as I guess according Mov Type, Material, Storage Location, GR No and PO or Plant the Cost center will become mandotory Filed.

Take the record for which You got error saying No batch input data for screen SAPLKACB 0002. Do manually in MB01 and see how the Screen is called. And consultant Functional for derevation of Cost Center.

What I mean by Procedure is :

1. In first screen of MB01 what fields do You enter once You enter what button you are gona click.

2. In second screen how are you enter a new line (is that You are clicking New Item button ) or how

3. And finally when do u save.

It could be helpful if you can paste the Code too.. try to post in Code tag.

Regards,

Suneel G

Read only

0 Likes
1,257

Thanks alot for your efforts.

When i do manuually i do not see the cosst centre screen.

Also one more thing after recording if the i process the same bdc session , it creates GR with no cost centre.

Below is my code.

REFRESH : bdcdata.

PERFORM bdc_dynpro USING 'SAPMM07M' '0200'.

PERFORM bdc_field USING 'BDC_CURSOR' 'MKPF-BKTXT'.

PERFORM bdc_field USING 'BDC_OKCODE' '/00'..

WRITE sy-datum TO w_data MM/DD/YYYY.

PERFORM bdc_field USING 'MKPF-BLDAT' w_data.

PERFORM bdc_field USING 'MKPF-BUDAT' w_data.

READ TABLE i_hdr_data.

READ TABLE i_line_data.

PERFORM bdc_field USING 'RM07M-LFSNR' i_hdr_data-xblnr.

PERFORM bdc_field USING 'MKPF-BKTXT' i_hdr_data-bktxt.

PERFORM bdc_field USING 'RM07M-BWARTWE' '101'.

PERFORM bdc_field USING 'RM07M-EBELN' i_hdr_data-ebeln.

PERFORM bdc_field USING 'RM07M-EBELP' i_line_data-posnr.

PERFORM bdc_field USING 'XFULL' 'X'.

PERFORM bdc_field USING 'RM07M-WVERS1' 'X'.

PERFORM bdc_dynpro USING 'SAPMM07M' '0221'.

PERFORM bdc_field USING 'BDC_CURSOR' 'MSEG-ERFMG(01)'.

PERFORM bdc_field USING 'BDC_OKCODE' '=SP'.

PERFORM bdc_field USING 'MSEG-ERFMG(01)' i_line_data-flfimg.

PERFORM bdc_dynpro USING 'SAPMM07M' '0210'.

PERFORM bdc_field USING 'BDC_CURSOR' 'DM07M-HSDAT_INPUT'.

PERFORM bdc_field USING 'BDC_OKCODE' '=SEUB'.

PERFORM bdc_field USING 'VM07M-LICHA' i_line_data-fkdmat.

CLEAR w_data. WRITE i_line_data-abrdt TO w_data MM/DD/YYYY.

PERFORM bdc_field USING 'DM07M-HSDAT_INPUT' i_line_data-abrdt.

LOOP AT i_comp_resb.

PERFORM bdc_dynpro USING 'SAPMM07M' '0410'.

PERFORM bdc_field USING 'BDC_CURSOR' 'MSEG-ERFMG'.

PERFORM bdc_field USING 'BDC_OKCODE' '/00'.

PERFORM bdc_field USING 'MSEG-ERFMG' i_comp_resb-lfimg.

PERFORM bdc_field USING 'MSEG-CHARG' i_comp_resb-charg.

PERFORM bdc_field USING 'DKACB-FMORE' 'X'.

PERFORM bdc_dynpro USING 'SAPMM07M' '0002'.

PERFORM bdc_field USING 'BDC_OKCODE' '=ENTE'.

*

ENDLOOP.

PERFORM bdc_dynpro USING 'SAPMM07M' '0221'.

PERFORM bdc_field USING 'BDC_CURSOR' 'MKPF-BUDAT'.

PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.

CALL TRANSACTION 'MB01' USING bdcdata

MODE l_mode

UPDATE 'S'

MESSAGES INTO xbdcmsgcoll.

Read only

0 Likes
1,257

Hi Nikki,

As you said its ok and why do't try checking chaing the Mode in 'A' and see why the Scree is 'SAPLKACB' '0002'. is called.

Regards,

Suneel G

Read only

0 Likes
1,257

Hi,

I tried that but i get the error in the second component qyt and batch which i already passsed in the bdc table.

Rgds

Nikki

Read only

0 Likes
1,257

Hi Nikki,

I am not understand you properly ...

regards,

Suneel G

Read only

Former Member
0 Likes
1,257

Hi Nikki,

As i read your post. You have problem with MB01 data migration. Do one thing you could do recoding with TCODE SHDB or SCAT. and afterward include the bdcrex1 and see. Still if cost center is giving problem then let me know.

As you previous problem i think either your screen field is mismatched or internal table whatever you created is not in proper way. Debug your program to check. if not success then go for both TCode whatever i told you before.

Regds,

Rakesh