04-09-2010 6:23 AM
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
04-09-2010 6:45 AM
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.
04-09-2010 6:45 AM
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.
04-09-2010 6:52 AM
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
04-09-2010 7:23 AM
You should use Bapi instead of BDC. You can use 'BAPI_MATERIAL_SAVEDATA' .
04-09-2010 7:32 AM
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
04-10-2010 5:47 AM