Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MM02 Upload Problem in BDC in Quality

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

Former Member
Former Member replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question