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: 

MM02 Upload Problem in BDC in Quality

Former Member
0 Kudos

Hello Experts ,

Currently I have situation here with BDC for MM02 . In sandbox I have recoded for only Quality Management View (which is at the 10th position). For all material types this is working fine.

But , when in Quality Server , the position of the views are changing dynamically with each material type. Hence BDC fails to select only Quality View during Upload.

Can anybody tell me if there is a way to encounter this ?

Thanks ,

Trishna

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi!

use fm 'MATERIAL_BTCI_SELECTION_NEW' to get view positon


FORM GET_POSITION USING    P_MATNR    LIKE MARA-MATNR
                  CHANGING P_POSITION TYPE N.

  DATA:
    S_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

  CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'
       EXPORTING
            MATERIAL                  = P_MATNR

            SELECTION                 = 'D'  <-- put here you view
            TCODE                     = 'MM02'
*    IMPORTING
*         SELSTATUS                 =
*         SELSTATUS_IN              =
       TABLES
            BTCI_D0070                = S_BDCDATA
     EXCEPTIONS
          MATERIAL_NOT_FOUND        = 1
          MATERIAL_NUMBER_MISSING   = 2
          MATERIAL_TYPE_MISSING     = 3
          MATERIAL_TYPE_NOT_FOUND   = 4
          NO_ACTIVE_DYNPRO_SELECTED = 5
          NO_AUTHORITY              = 6
          OTHERS                    = 7.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
*-> in der Annahme, dau043F der Dispobereich immer auf der Sicht
*-> 'Dispositon 1' zu finden ist.
    READ TABLE S_BDCDATA WITH KEY FVAL = K_CHAR_X.
    P_POSITION = SY-TABIX - 1.
  ENDIF.

ENDFORM.                               " GET_POSITION
.....

Search forum for MATERIAL_BTCI_SELECTION_NEW and you find more examples.

5 REPLIES 5

Former Member
0 Kudos

Hi!

use fm 'MATERIAL_BTCI_SELECTION_NEW' to get view positon


FORM GET_POSITION USING    P_MATNR    LIKE MARA-MATNR
                  CHANGING P_POSITION TYPE N.

  DATA:
    S_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

  CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'
       EXPORTING
            MATERIAL                  = P_MATNR

            SELECTION                 = 'D'  <-- put here you view
            TCODE                     = 'MM02'
*    IMPORTING
*         SELSTATUS                 =
*         SELSTATUS_IN              =
       TABLES
            BTCI_D0070                = S_BDCDATA
     EXCEPTIONS
          MATERIAL_NOT_FOUND        = 1
          MATERIAL_NUMBER_MISSING   = 2
          MATERIAL_TYPE_MISSING     = 3
          MATERIAL_TYPE_NOT_FOUND   = 4
          NO_ACTIVE_DYNPRO_SELECTED = 5
          NO_AUTHORITY              = 6
          OTHERS                    = 7.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
*-> in der Annahme, dau043F der Dispobereich immer auf der Sicht
*-> 'Dispositon 1' zu finden ist.
    READ TABLE S_BDCDATA WITH KEY FVAL = K_CHAR_X.
    P_POSITION = SY-TABIX - 1.
  ENDIF.

ENDFORM.                               " GET_POSITION
.....

Search forum for MATERIAL_BTCI_SELECTION_NEW and you find more examples.

Former Member
0 Kudos

Instead of Using BDC for material master upload, why don't you use the standard BAPI "BAPI_MATERIAL_SAVEREPLICA". This will avoid such problems.

Regards

Vinod

Former Member
0 Kudos

You should use Bapi instead of BDC. You can use 'BAPI_MATERIAL_SAVEDATA' .

former_member183990
Active Contributor
0 Kudos

Please ask your functional consultant to change the order of screen

they can change the order of screen.

But it is always better to use a BAPI instead of BDC.

some of the disadvantages of BAPI is

1. change history won't be avaialable in some cases.

ask your functional consultant to check in this

OMT3B Define Structure of Data Screens for Each Screen Sequence

cheers

S.Janagar

0 Kudos

Hey Andrey!

Its solved thanks !!!!!!!