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

BDC MD61

Former Member
0 Likes
2,264

Hi Gurus,

I am working on MD61 BDC....I facing problem for scrolling down to next page ...I am using p+ for next page..but it not working...In md61 19 rows are visible ..upto 19th row it working fine..after 19th it is going to next page but after puting one material (20th row)...it comes back again to 1st page.

Can anyone help me on this.

Thanks in advance

Supriya

Hi Gurus,

I am working on MD61 BDC....I facing problem for scrolling down to next page ...I am using p+ for next page..but it not working...In md61 19 rows are visible ..upto 19th row it working fine..after 19th it is going to next page but after puting one material (20th row)...it comes back again to 1st page.

Can anyone help me on this.

Thanks in advance

Supriya

17 REPLIES 17
Read only

faisalatsap
Active Contributor
0 Likes
2,110

Hi, Supriya

I think you don't go through this link the 4th on at the top of ABAP, General [Limit of 2500 characters in a posting|/thread/1319756 [original link is broken];

No one will be able to help you with the code like this, So Please Follow Limit Condition than code will show in proper form.

Regards,

Faisal

Read only

0 Likes
2,110
start-of-selection.


  perform open_group.

  loop at ltab.

    CONDENSE ITAB-W_QTY1.
    CONDENSE ITAB-W_QTY2 .
    CONDENSE ITAB-W_QTY3 .
    CONDENSE ITAB-W_QTY4.
    perform bdc_dynpro      using 'SAPMM60X' '0100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBDPT'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'AM60X-MATNR'.
    perform bdc_field       using 'AM60X-MATAW'
                                  ' '.
    perform bdc_field       using 'AM60X-PBDAW'
                                 'X'.
    perform bdc_field       using 'AM60X-PBDNR'
                                LTAB-req_no.
    perform bdc_field       using 'AM60X-WERKS'
                              LTAB-werks.
    perform bdc_dynpro      using 'SAPMM60X' '0127'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'T459U-ENTLU'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WEIT'.
    perform bdc_field       using 'HM60X-UEBEINZ'
                                  'X'.
    perform bdc_field       using 'T459U-BEDAE'
                                  LTAB-REQ_TYP.
    perform bdc_field       using 'T459U-ENTLU'
                                  LTAB-mode.
    perform bdc_field       using 'HM60X-ORPLAN'
                                  'X'.
    perform bdc_field       using 'T459U-VERVS'
                                  'X'.
    perform bdc_dynpro      using 'SAPMM60X' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'AM60X-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'AM60X-MATAW'
                                  ' '.
    perform bdc_field       using 'AM60X-MATNR'
                                  ' '.
    perform bdc_field       using 'AM60X-WERKS'
                                  LTAB-werks.
    perform bdc_field       using 'RM60X-VERSB'
                                  LTAB-VERSB.

contd..

Read only

0 Likes
2,110
perform bdc_field       using 'RM60X-ENTLU'
                                  LTAB-mode.
    perform bdc_field       using 'AM60X-PBDAW'
                                  'X'.
    perform bdc_field       using 'AM60X-PBDNR'
                                  LTAB-req_no.
    perform bdc_dynpro      using 'SAPLM60E' '0200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM60X-PLN05(03)'.

    CLEAR : WRK_STR,WRK_STR1,itab.
    loop at itab where req_no = ltab-req_no AND werks = LTAB-werks AND VERSB = LTAB-VERSB AND
                                REQ_TYP = LTAB-REQ_TYP AND mode = LTAB-mode ."AND indi = LTAB-indi.


IF WRK_STR EQ 19.

perform bdc_dynpro      using 'SAPLM60E' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.
perform bdc_dynpro      using 'SAPLM60E' '0200'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.

WRK_STR = 00.
*WRK_SEL = 00.
WRK_QTR = 00.

ENDIF.

      WRK_STR =  WRK_STR + 1.
      CONDENSE WRK_STR.
      CONCATENATE 'PBPT-MATNR' '(' WRK_STR ')' INTO WRK_STR1.

      WRK_QTR = WRK_QTR + 1.
      CONDENSE WRK_QTR.
      CONCATENATE 'RM60X-PLN01' '(' WRK_QTR ')' INTO WRK_QTY1.
      CONCATENATE 'RM60X-PLN02' '(' WRK_QTR ')' INTO WRK_QTY2.
      CONCATENATE 'RM60X-PLN03' '(' WRK_QTR ')' INTO WRK_QTY3.
      CONCATENATE 'RM60X-PLN04' '(' WRK_QTR ')' INTO WRK_QTY4.
      CONCATENATE 'RM60X-PLN05' '(' WRK_QTR ')' INTO WRK_QTY5.
      CONCATENATE 'RM60X-PLN06' '(' WRK_QTR ')' INTO WRK_QTY6.
      CONCATENATE 'RM60X-PLN07' '(' WRK_QTR ')' INTO WRK_QTY7.
      CONCATENATE 'RM60X-PLN08' '(' WRK_QTR ')' INTO WRK_QTY8.
      CONCATENATE 'RM60X-PLN09' '(' WRK_QTR ')' INTO WRK_QTY9.
      CONCATENATE 'RM60X-PLN010' '(' WRK_QTR ')' INTO WRK_QTY10.
      CONCATENATE 'RM60X-PLN011' '(' WRK_QTR ')' INTO WRK_QTY11.
      CONCATENATE 'RM60X-PLN012' '(' WRK_QTR ')' INTO WRK_QTY12.
      CONCATENATE 'RM60X-PLN013' '(' WRK_QTR ')' INTO WRK_QTY13.
      CONCATENATE 'RM60X-PLN014' '(' WRK_QTR ')' INTO WRK_QTY14.
      CONCATENATE 'RM60X-PLN015' '(' WRK_QTR ')' INTO WRK_QTY15

.

contd...

Read only

0 Likes
2,110
WRK_SEL =  WRK_SEL + 1.
      CONDENSE WRK_SEL.
      CONCATENATE 'RM60X-PBPT_SELKZ' '(' WRK_SEL ')' INTO WRK_SEL1.
      perform bdc_field       using WRK_STR1
                                  ITAB-MATNR.

      perform bdc_field       using WRK_QTY1
                              ITAB-W_qty1.
      perform bdc_field       using WRK_QTY2
                                    ITAB-W_qty2.
      perform bdc_field       using WRK_QTY3
                                    ITAB-W_qty3.
      perform bdc_field       using WRK_QTY4
                                    ITAB-W_qty4.
      perform bdc_field       using WRK_QTY5
                                    ITAB-W_qty5.
      perform bdc_field       using WRK_QTY6
                                    ITAB-W_qty6.
      perform bdc_field       using WRK_QTY7
                                    ITAB-W_qty7.
      perform bdc_field       using WRK_QTY8
                                    ITAB-W_qty8.
      perform bdc_field       using WRK_QTY9
                                    ITAB-W_qty9.
      perform bdc_field       using WRK_QTY10
                                    ITAB-W_qty10.
      perform bdc_field       using WRK_QTY11
                                    ITAB-W_qty11.
      perform bdc_field       using WRK_QTY12
                                    ITAB-W_qty12.
      perform bdc_field       using WRK_QTY13
                                    ITAB-W_qty13.
      perform bdc_field       using WRK_QTY14
                                    ITAB-W_qty14.
      perform bdc_field       using WRK_QTY15
                                    ITAB-W_qty15.
*      IF WRK_STR LT 19.
      perform bdc_dynpro      using 'SAPLM60E' '0200'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
*       ENDIF.
      perform bdc_dynpro      using 'SAPLM60E' '0200'.

ENDLOOP.

perform bdc_dynpro      using 'SAPLM60E' '0200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'PBPT-MATNR(01)'.
    perform bdc_transaction using 'MD61'.


  endloop.

  perform close_group

Read only

0 Likes
2,110

Hi...

Just copy and paste this code... hope this will resove your issue ....


IF WRK_STR EQ 19.
 
perform bdc_dynpro      using 'SAPLM60E' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.
perform bdc_dynpro      using 'SAPLM60E' '0200'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.

perform bdc_dynpro      using 'SAPLM60E' '0200'.    "  Added Code
perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
 
WRK_STR = 00.
*WRK_SEL = 00.
WRK_QTR = 00.
 
ENDIF.
 
      WRK_STR =  WRK_STR + 1.
      CONDENSE WRK_STR.
      CONCATENATE 'PBPT-MATNR' '(' WRK_STR ')' INTO WRK_STR1.
 
      WRK_QTR = WRK_QTR + 1.
      CONDENSE WRK_QTR.
      CONCATENATE 'RM60X-PLN01' '(' WRK_QTR ')' INTO WRK_QTY1.
      CONCATENATE 'RM60X-PLN02' '(' WRK_QTR ')' INTO WRK_QTY2.
      CONCATENATE 'RM60X-PLN03' '(' WRK_QTR ')' INTO WRK_QTY3.
      CONCATENATE 'RM60X-PLN04' '(' WRK_QTR ')' INTO WRK_QTY4.
      CONCATENATE 'RM60X-PLN05' '(' WRK_QTR ')' INTO WRK_QTY5.
      CONCATENATE 'RM60X-PLN06' '(' WRK_QTR ')' INTO WRK_QTY6.
      CONCATENATE 'RM60X-PLN07' '(' WRK_QTR ')' INTO WRK_QTY7.
      CONCATENATE 'RM60X-PLN08' '(' WRK_QTR ')' INTO WRK_QTY8.
      CONCATENATE 'RM60X-PLN09' '(' WRK_QTR ')' INTO WRK_QTY9.
      CONCATENATE 'RM60X-PLN010' '(' WRK_QTR ')' INTO WRK_QTY10.
      CONCATENATE 'RM60X-PLN011' '(' WRK_QTR ')' INTO WRK_QTY11.
      CONCATENATE 'RM60X-PLN012' '(' WRK_QTR ')' INTO WRK_QTY12.
      CONCATENATE 'RM60X-PLN013' '(' WRK_QTR ')' INTO WRK_QTY13.
      CONCATENATE 'RM60X-PLN014' '(' WRK_QTR ')' INTO WRK_QTY14.
      CONCATENATE 'RM60X-PLN015' '(' WRK_QTR ')' INTO WRK_QTY15.

contd..

Read only

0 Likes
2,110

WRK_SEL =  WRK_SEL + 1.
      CONDENSE WRK_SEL.
      CONCATENATE 'RM60X-PBPT_SELKZ' '(' WRK_SEL ')' INTO WRK_SEL1.
      perform bdc_field       using WRK_STR1
                                  ITAB-MATNR.
 
      perform bdc_field       using WRK_QTY1
                              ITAB-W_qty1.
      perform bdc_field       using WRK_QTY2
                                    ITAB-W_qty2.
      perform bdc_field       using WRK_QTY3
                                    ITAB-W_qty3.
      perform bdc_field       using WRK_QTY4
                                    ITAB-W_qty4.
      perform bdc_field       using WRK_QTY5
                                    ITAB-W_qty5.
      perform bdc_field       using WRK_QTY6
                                    ITAB-W_qty6.
      perform bdc_field       using WRK_QTY7
                                    ITAB-W_qty7.
      perform bdc_field       using WRK_QTY8
                                    ITAB-W_qty8.
      perform bdc_field       using WRK_QTY9
                                    ITAB-W_qty9.
      perform bdc_field       using WRK_QTY10
                                    ITAB-W_qty10.
      perform bdc_field       using WRK_QTY11
                                    ITAB-W_qty11.
      perform bdc_field       using WRK_QTY12
                                    ITAB-W_qty12.
      perform bdc_field       using WRK_QTY13
                                    ITAB-W_qty13.
      perform bdc_field       using WRK_QTY14
                                    ITAB-W_qty14.
      perform bdc_field       using WRK_QTY15
                                    ITAB-W_qty15.

" Code removed....

ENDLOOP.


perform bdc_dynpro      using 'SAPLM60E' '0200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'PBPT-MATNR(01)'.
    perform bdc_transaction using 'MD61'.
 
 
  endloop.
 
  perform close_group

Regards,

Siddarth

Read only

0 Likes
2,110

Hi,

Thanks .. I tried ur code..but it did'nt help...I am getting this message 'Screen 0000 is too large for internal

area' .

Supriya

Read only

0 Likes
2,110

Hi,

You may do the following process

goto the screen ie MD61 Tcode

then switch on the debugger and scroll down

catch the ok code

while you write the bdc leave the first line.

start from the second

regards,

shiva

Read only

0 Likes
2,110

Hi,

change this if statement....

IF WRK_STR EQ 19.
 
perform bdc_dynpro      using 'SAPLM60E' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.

perform bdc_dynpro      using 'SAPLM60E' '0200'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.
 "one line removed..... here and rest all same....
perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
 
WRK_STR = 00.
*WRK_SEL = 00.
WRK_QTR = 00.
 
ENDIF.

Read only

0 Likes
2,110

Thanks Shiva,

Ok code for scroll down is '=P+'....i have already written it my code ...after filling all 19 rows it is going to next page but after putting just one material it comes back to page 1.

I tried by putting material no from second line also but it din help .

Supriya

Read only

0 Likes
2,110

hi,

ignore the previous codes......

Pasting the code from starting... this should work i believe.....

have made some small changes which were causing the errors....

start-of-selection.
 
 
  perform open_group.
 
  loop at ltab.
 
    CONDENSE ITAB-W_QTY1.
    CONDENSE ITAB-W_QTY2 .
    CONDENSE ITAB-W_QTY3 .
    CONDENSE ITAB-W_QTY4.
    perform bdc_dynpro      using 'SAPMM60X' '0100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBDPT'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'AM60X-MATNR'.
    perform bdc_field       using 'AM60X-MATAW'
                                  ' '.
    perform bdc_field       using 'AM60X-PBDAW'
                                 'X'.
    perform bdc_field       using 'AM60X-PBDNR'
                                LTAB-req_no.
    perform bdc_field       using 'AM60X-WERKS'
                              LTAB-werks.
    perform bdc_dynpro      using 'SAPMM60X' '0127'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'T459U-ENTLU'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WEIT'.
    perform bdc_field       using 'HM60X-UEBEINZ'
                                  'X'.
    perform bdc_field       using 'T459U-BEDAE'
                                  LTAB-REQ_TYP.
    perform bdc_field       using 'T459U-ENTLU'
                                  LTAB-mode.
    perform bdc_field       using 'HM60X-ORPLAN'
                                  'X'.
    perform bdc_field       using 'T459U-VERVS'
                                  'X'.
    perform bdc_dynpro      using 'SAPMM60X' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'AM60X-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'AM60X-MATAW'
                                  ' '.
    perform bdc_field       using 'AM60X-MATNR'
                                  ' '.
    perform bdc_field       using 'AM60X-WERKS'
                                  LTAB-werks.
    perform bdc_field       using 'RM60X-VERSB'
                                  LTAB-VERSB.

Read only

0 Likes
2,110

perform bdc_field       using 'RM60X-ENTLU'
                                  LTAB-mode.
    perform bdc_field       using 'AM60X-PBDAW'
                                  'X'.
    perform bdc_field       using 'AM60X-PBDNR'
                                  LTAB-req_no.
    perform bdc_dynpro      using 'SAPLM60E' '0200'.
		" OK CODE REMOVED FROM HERE
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM60X-PLN05(03)'.
 
    CLEAR : WRK_STR,WRK_STR1,itab.
    loop at itab where req_no = ltab-req_no AND werks = LTAB-werks AND VERSB = LTAB-VERSB AND
                                REQ_TYP = LTAB-REQ_TYP AND mode = LTAB-mode ."AND indi = LTAB-indi.
 
 
IF WRK_STR EQ 19.
 
perform bdc_dynpro      using 'SAPLM60E' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.
perform bdc_dynpro      using 'SAPLM60E' '0200'.

perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.

 
WRK_STR = 00.
*WRK_SEL = 00.
WRK_QTR = 00.
 
ENDIF.
 
      WRK_STR =  WRK_STR + 1.
      CONDENSE WRK_STR.
      CONCATENATE 'PBPT-MATNR' '(' WRK_STR ')' INTO WRK_STR1.
 
      WRK_QTR = WRK_QTR + 1.
      CONDENSE WRK_QTR.
      CONCATENATE 'RM60X-PLN01' '(' WRK_QTR ')' INTO WRK_QTY1.
      CONCATENATE 'RM60X-PLN02' '(' WRK_QTR ')' INTO WRK_QTY2.
      CONCATENATE 'RM60X-PLN03' '(' WRK_QTR ')' INTO WRK_QTY3.
      CONCATENATE 'RM60X-PLN04' '(' WRK_QTR ')' INTO WRK_QTY4.
      CONCATENATE 'RM60X-PLN05' '(' WRK_QTR ')' INTO WRK_QTY5.
      CONCATENATE 'RM60X-PLN06' '(' WRK_QTR ')' INTO WRK_QTY6.
      CONCATENATE 'RM60X-PLN07' '(' WRK_QTR ')' INTO WRK_QTY7.
      CONCATENATE 'RM60X-PLN08' '(' WRK_QTR ')' INTO WRK_QTY8.
      CONCATENATE 'RM60X-PLN09' '(' WRK_QTR ')' INTO WRK_QTY9.
      CONCATENATE 'RM60X-PLN010' '(' WRK_QTR ')' INTO WRK_QTY10.
      CONCATENATE 'RM60X-PLN011' '(' WRK_QTR ')' INTO WRK_QTY11.
      CONCATENATE 'RM60X-PLN012' '(' WRK_QTR ')' INTO WRK_QTY12.
      CONCATENATE 'RM60X-PLN013' '(' WRK_QTR ')' INTO WRK_QTY13.
      CONCATENATE 'RM60X-PLN014' '(' WRK_QTR ')' INTO WRK_QTY14.
      CONCATENATE 'RM60X-PLN015' '(' WRK_QTR ')' INTO WRK_QTY15.
Read only

0 Likes
2,110

WRK_SEL =  WRK_SEL + 1.
      CONDENSE WRK_SEL.
      CONCATENATE 'RM60X-PBPT_SELKZ' '(' WRK_SEL ')' INTO WRK_SEL1.
      perform bdc_field       using WRK_STR1
                                  ITAB-MATNR.
 
      perform bdc_field       using WRK_QTY1
                              ITAB-W_qty1.
      perform bdc_field       using WRK_QTY2
                                    ITAB-W_qty2.
      perform bdc_field       using WRK_QTY3
                                    ITAB-W_qty3.
      perform bdc_field       using WRK_QTY4
                                    ITAB-W_qty4.
      perform bdc_field       using WRK_QTY5
                                    ITAB-W_qty5.
      perform bdc_field       using WRK_QTY6
                                    ITAB-W_qty6.
      perform bdc_field       using WRK_QTY7
                                    ITAB-W_qty7.
      perform bdc_field       using WRK_QTY8
                                    ITAB-W_qty8.
      perform bdc_field       using WRK_QTY9
                                    ITAB-W_qty9.
      perform bdc_field       using WRK_QTY10
                                    ITAB-W_qty10.
      perform bdc_field       using WRK_QTY11
                                    ITAB-W_qty11.
      perform bdc_field       using WRK_QTY12
                                    ITAB-W_qty12.
      perform bdc_field       using WRK_QTY13
                                    ITAB-W_qty13.
      perform bdc_field       using WRK_QTY14
                                    ITAB-W_qty14.
      perform bdc_field       using WRK_QTY15
                                    ITAB-W_qty15.

ENDLOOP.

    perform bdc_field       using 'BDC_OKCODE'        " OK_CODE Added here...
                                  '/00'.

perform bdc_dynpro      using 'SAPLM60E' '0200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'PBPT-MATNR(01)'.
    perform bdc_transaction using 'MD61'.
 
 
  endloop.
 
  perform close_group
Read only

0 Likes
2,110

Hi,

It din work coz if i don put

perform bdc_field using 'BDC_OKCODE' " OK_CODE

'/00'.

into loop ,the program tries to put all the materials simultaneously on table control, and wen it din find the enough space i.e wen the data crosses 19 rows it is giving the message 'Screen 0000 is too large for internal b

area ' aborting the program.

Read only

0 Likes
2,110

hi,

I have changed the code in the last three messages of mine.... please copy those code....

i think it will sure work....

the thread was posted at

Posted: Aug 24, 2009 1:43 PM

and the code starts from START-OF-SELECTION....

from there I have given you the code....

copy and paste it in your program.... this should work......

Regards,

Siddarth

Edited by: Siddharth Chordia on Aug 24, 2009 2:27 PM

Read only

0 Likes
2,110

Not solved

Read only

0 Likes
2,110

HI,

IN THE IF CONDITION WRK_SEL = '00' IS COMMENTED OUT.. PLEASE UNCOMMENT IT... AS ITS VALUE WILL BE GRATER THAN 19....

IF WRK_STR EQ 19.
 
perform bdc_dynpro      using 'SAPLM60E' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.
perform bdc_dynpro      using 'SAPLM60E' '0200'.
 
perform bdc_field       using 'BDC_CURSOR'
                              'PBPT-MATNR(01)'.
 
 
WRK_STR = 00.
WRK_SEL = 00.           " THIS LINE SHOULD NOT BE COMMENTED
WRK_QTR = 00.
 
ENDIF.

if it still doesn't solve.... please paste the code of the inner loop and few lines before and after that loop.....

Regards,

Siddarth

Edited by: Siddharth Chordia on Aug 25, 2009 8:02 AM