2010 Sep 23 3:30 PM
Hi All,
Sorry if my stupid question.
I am working with BAPI_MATERIAL_AVAILABILITY and I have found a problem.
When I test this FM using Tcode SE37, the result is ok, but when I test this FM with ABAP program, I got the message "
WM3351Article 311111 not maintained in site 1101.
Please, I need your help.
Below is my ABAP program.
DATA: tab_wmdvsx TYPE TABLE OF bapiwmdvs WITH HEADER LINE,
tab_wmdvex TYPE TABLE OF bapiwmdve WITH HEADER LINE,
vplant TYPE BAPIMATVP-WERKS,
vmaterial TYPE mara-matnr,
vunit TYPE BAPIADMM-UNIT,
vstge_loc TYPE BAPICM61V-LGORT,
vendleadtime TYPE BAPICM61M-WZTER,
vav_qty_plt TYPE BAPICM61V-WKBST,
vdialogflag TYPE BAPICM61V-DIAFL,
vreturn TYPE BAPIRETURN.
vplant = '1101'.
vstge_loc = '0001'.
vmaterial = '311111'.
vunit = 'EA '.
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
plant = vplant
material = vmaterial
unit = vunit
check_rule = 'B'
stge_loc = vstge_loc
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
IMPORTING
ENDLEADTME = vendleadtime
AV_QTY_PLT = vav_qty_plt
DIALOGFLAG = vdialogflag
RETURN = vreturn
TABLES
wmdvsx = tab_wmdvsx
wmdvex = tab_wmdvex.
IF sy-subrc = 0.
WRITE: / 'AV_QTY_PLT=', vav_qty_plt,
/, 'return=', vreturn,
/, 'dialog flag=', vdialogflag,
/, 'end lead time=', vendleadtime.
ENDIF.
Thank you!!!!!
2010 Sep 23 3:47 PM
Hi,
1. For the vmaterial, use conversion exit and pass the material number.
2. Check if the material exists in the plant.
Hope it helps
Sujay
Hi All,
Sorry if my stupid question.
I am working with BAPI_MATERIAL_AVAILABILITY and I have found a problem.
When I test this FM using Tcode SE37, the result is ok, but when I test this FM with ABAP program, I got the message "
WM3351Article 311111 not maintained in site 1101.
Please, I need your help.
Below is my ABAP program.
DATA: tab_wmdvsx TYPE TABLE OF bapiwmdvs WITH HEADER LINE,
tab_wmdvex TYPE TABLE OF bapiwmdve WITH HEADER LINE,
vplant TYPE BAPIMATVP-WERKS,
vmaterial TYPE mara-matnr,
vunit TYPE BAPIADMM-UNIT,
vstge_loc TYPE BAPICM61V-LGORT,
vendleadtime TYPE BAPICM61M-WZTER,
vav_qty_plt TYPE BAPICM61V-WKBST,
vdialogflag TYPE BAPICM61V-DIAFL,
vreturn TYPE BAPIRETURN.
vplant = '1101'.
vstge_loc = '0001'.
vmaterial = '311111'.
vunit = 'EA '.
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
plant = vplant
material = vmaterial
unit = vunit
check_rule = 'B'
stge_loc = vstge_loc
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
IMPORTING
ENDLEADTME = vendleadtime
AV_QTY_PLT = vav_qty_plt
DIALOGFLAG = vdialogflag
RETURN = vreturn
TABLES
wmdvsx = tab_wmdvsx
wmdvex = tab_wmdvex.
IF sy-subrc = 0.
WRITE: / 'AV_QTY_PLT=', vav_qty_plt,
/, 'return=', vreturn,
/, 'dialog flag=', vdialogflag,
/, 'end lead time=', vendleadtime.
ENDIF.
Thank you!!!!!
2010 Sep 23 3:47 PM
Hi,
1. For the vmaterial, use conversion exit and pass the material number.
2. Check if the material exists in the plant.
Hope it helps
Sujay
2010 Sep 23 4:10 PM
2010 Sep 23 5:31 PM
2010 Sep 23 5:36 PM
HI Sujay,
Unfortunately, I am still a new ABAP programmer
Please could you tell what it is converstion exit ?
Thank you for all !!!
Edson Luiz
2010 Sep 23 6:17 PM
Hi Edson,
You have to pass the internal material number to the BAPI. You can use function module to get the same.
CONVERSION_EXIT_MATN2_INPUT
exporting
input = lv_matnr
importing
input = lv_matnr.
Hope it helps
Sujay
2010 Sep 23 7:11 PM
Hi Sujay,
You are great !!!!!!
Everything is fine!!!
Now,I will try to find out how include this CONVERSION_EXIT_MATN2_INPUT in JAVA Web Service.
My problem is in Web Service.
But, with your help, now I am sure the structure is fine.
Thank you so much !!!!
Edson Luiz
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |