Application Development 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: 

Regarding BDC

Former Member
0 Kudos

Hi Gurus,

I am doing BDC for MM01 transaction.For this i have to select the views Basic data1, Sales 1,Sales 2, Sales general data, Purchasing, Mrp1, Mrp2, General plant data, ware house manage ment 1 and Accounting 1.

It going fine in front end.but the problem is in back ground.Whats the problem is for selecting views i have to drag the scroll bar down.For this it is recording the cursor position .When i am processing fore ground , when views coming i press the scroll bar its going fyn.

But in back ground it shows error.Please can one help me regarding this.

Thanks in Advance.

regards

Srihari.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Srihari

We should not be using the scroll button here, instead use Page down for seeing the next views.

All the views configured will have the position number attached to it. you will be able to see about 18 views the rest will be in the scond page. when you hit the page down button the 19th view will have position number 1 as it is the first one in the second screen.

Remember these points and ontinue with your recording... I am sure that it will solve your issue.. see the sample recording below where I have selected ware house manage ment 1 and Accounting 1 views also.

0000 T MM01

SAPLMGMM 0060 X

0000 BDC_CURSOR RMMG1-MATNR

0000 BDC_OKCODE =AUSW

0000 RMMG1-MATNR AS1335-01

0000 RMMG1-MBRSH M

0000 RMMG1-MTART ZFIN

0000 BDC_SUBSCR SAPLMGV_MATERIAL_SPEC 0200SUB1

0000 BDC_SUBSCR SAPLMGV_MATERIAL_SPEC 0001SUB1

SAPLMGMM 0070 X

0000 BDC_CURSOR MSICHTAUSW-DYTXT(13)

0000 BDC_OKCODE =P+

0000 MSICHTAUSW-KZSEL(01) X

0000 MSICHTAUSW-KZSEL(02) X

0000 MSICHTAUSW-KZSEL(13) X

SAPLMGMM 0070 X

0000 BDC_CURSOR MSICHTAUSW-DYTXT(03)

0000 BDC_OKCODE =ENTR

0000 MSICHTAUSW-KZSEL(01) X

0000 MSICHTAUSW-KZSEL(03) X

SAPLMGMM 0080 X

0000 BDC_OKCODE /EABBR

0000 BDC_CURSOR RMMG1-WERKS

SAPLMGMM 0060 X

0000 BDC_OKCODE /EABBR

0000 BDC_CURSOR RMMG1-MATNR

-

Santosh

7 REPLIES 7

Former Member
0 Kudos

Hi,

This is the problem of table control.

You need to pass OK code for Page Down, which is P++.

Loop your internal table while filling BDC table and say after every 8-12 entries pass this OK code which will scroll down the page.

For Page Up OK code is P--.

Hope this helps.

Regards,

Lalit

0 Kudos

Hi lalit,

Thanks for giving idea, Its working But the problem is its totally going to page down, when it going to page down some of the views or not selected, is there any ok code for going half of the page down . or tell me any other idea to select the view on second page.

Thanks in Advance.

Regards

Srihari.

0 Kudos

Hi Srihari,

There should be a tab on the screen for Select All. That you can record while makein the recording.

Reward if helpful!

Regards,

Lalit

0 Kudos

Hi Srihari,

Personally I would like to record, by only selecting the Basic data view and then record the other views using the tabstrip buttons inside the transaction.

KalC
Active Participant
0 Kudos

Hi Srihari,

This code might be helpful.to select views dynamically.

**********************************************************

DATA:count TYPE i,

view1(2) TYPE c,

msich(20) TYPE c,

msich1(20) TYPE c.

count = view_order.

view1 = count + 1.

CONCATENATE 'MSICHTAUSW-KZSEL(' view_order ')' INTO msich.

CONCATENATE 'MSICHTAUSW-KZSEL(' view1 ')' INTO msich1.

IF chng_new = 'N'. "r chng_new = 'T'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0060',

' ' 'RMMG1-MATNR' import-matnr,

' ' 'RMMG1-MBRSH' 'M',

' ' 'RMMG1-MTART' 'HAWA',

' ' 'BDC_OKCODE' 'AUSW'.

ELSEIF chng_new = 'C'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0060',

' ' 'RMMG1-MATNR' import-matnr,

' ' 'BDC_OKCODE' 'AUSW'.

ENDIF.

  • View selection if New material is to be created.

CASE view_field.

  • Basic View '1'.

WHEN 'XEIK1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X', "Basic

' ' 'BDC_OKCODE' 'SCHL'.

  • Sales Org '3'.

WHEN 'XEIV1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' msich1 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks,

' ' 'RMMG1-VKORG' plant-vkorg,

' ' 'RMMG1-VTWEG' vtweg1.

  • Sales Plant data '3'.

WHEN 'XEIV2'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks,

' ' 'RMMG1-VKORG' plant-vkorg,

' ' 'RMMG1-VTWEG' vtweg1.

  • Purchasing view '6'.

WHEN 'XEIE1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks.

  • MRP View 1 '8'.

WHEN 'XEID1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' msich1 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks,

' ' 'RMMG1-LGORT' i_znrd_accdef-lgort.

IF chng_new = 'N'. "r chng_new = 'T'.

PERFORM generate_bdc_data USING:

' ' 'RMMG1-DISPR' i_znrd_accdef-dispr.

ENDIF.

  • MRP View 2 '8'.

WHEN 'XEID2'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks,

' ' 'RMMG1-LGORT' i_znrd_accdef-lgort,

' ' 'RMMG1-DISPR' i_znrd_accdef-dispr.

  • Forcasting View '10'.

WHEN 'XEIP1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks,

' ' 'RMMG1-PROPR' i_znrd_accdef-propr.

  • Accounting '14'.

WHEN 'XEIB1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks.

  • Storage view '11'.

WHEN 'XEIL1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks,

' ' 'RMMG1-LGORT' i_znrd_accdef-lgort.

  • Warehouse Managerment View.

WHEN 'XEIS1'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0070',

' ' msich 'X',

' ' 'BDC_OKCODE' 'SCHL'.

PERFORM generate_bdc_data USING:

'X' 'SAPLMGMM' '0080',

' ' 'RMMG1-WERKS' plant-werks.

LOOP AT sel_plant_wh WHERE werks = plant-werks.

IF sel_plant_wh-lgnum <> ''.

PERFORM generate_bdc_data USING:

' ' 'RMMG1-LGNUM' sel_plant_wh-lgnum.

ENDIF.

ENDLOOP.

ENDCASE.

**************************************

reward if helpful.

Regards,

Kalyan.

Former Member
0 Kudos

Hi Srihari

We should not be using the scroll button here, instead use Page down for seeing the next views.

All the views configured will have the position number attached to it. you will be able to see about 18 views the rest will be in the scond page. when you hit the page down button the 19th view will have position number 1 as it is the first one in the second screen.

Remember these points and ontinue with your recording... I am sure that it will solve your issue.. see the sample recording below where I have selected ware house manage ment 1 and Accounting 1 views also.

0000 T MM01

SAPLMGMM 0060 X

0000 BDC_CURSOR RMMG1-MATNR

0000 BDC_OKCODE =AUSW

0000 RMMG1-MATNR AS1335-01

0000 RMMG1-MBRSH M

0000 RMMG1-MTART ZFIN

0000 BDC_SUBSCR SAPLMGV_MATERIAL_SPEC 0200SUB1

0000 BDC_SUBSCR SAPLMGV_MATERIAL_SPEC 0001SUB1

SAPLMGMM 0070 X

0000 BDC_CURSOR MSICHTAUSW-DYTXT(13)

0000 BDC_OKCODE =P+

0000 MSICHTAUSW-KZSEL(01) X

0000 MSICHTAUSW-KZSEL(02) X

0000 MSICHTAUSW-KZSEL(13) X

SAPLMGMM 0070 X

0000 BDC_CURSOR MSICHTAUSW-DYTXT(03)

0000 BDC_OKCODE =ENTR

0000 MSICHTAUSW-KZSEL(01) X

0000 MSICHTAUSW-KZSEL(03) X

SAPLMGMM 0080 X

0000 BDC_OKCODE /EABBR

0000 BDC_CURSOR RMMG1-WERKS

SAPLMGMM 0060 X

0000 BDC_OKCODE /EABBR

0000 BDC_CURSOR RMMG1-MATNR

-

Santosh

0 Kudos

Hi santhosh,

Thanks for giving good suggestion.Its working fine.My problem solved.

Thank you very much. I rewarded you .

Cheers

Srihari.