Skip to Content

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

To capture the View in MM01

hi frndz,

how to capture the position of a sales view or any view in mm01 while creating material master

using bdc program .

Former Member
Former Member replied

Hi,

Use the below function module.

CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW' " Function module for getting all view's for the particular material into internal table..

EXPORTING

MATERIAL = WA_SALES_P-MATNR " Material number

MATERIALART = WA_SALES_P-MTART " Material Type

SELECTION = 'V' " PSTAT(maintenance status) value for Quality Managemant.

TCODE = 'MM01' " Tcode where view's are called.

TABLES

BTCI_D0070 = IT_BDCDATA_VIEW

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.

READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL = 'X'.

IF SY-SUBRC = 0.

V_SELECTION = IT_BDCDATA_VIEW-FNAM.

ELSE.

CONTINUE.

ENDIF.

VAR = IT_BDCDATA_VIEW-FNAM+17(2).

CLEAR VAR1.

CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1. "MRP1

Rgds

siva

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