Application Development and Automation 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: 
Read only

Article not maintained in site

Former Member
0 Likes
1,536

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!!!!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,196

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,

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,197

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

Read only

0 Likes
1,196

Check if the article had been listed to the plant in WLK1

Read only

0 Likes
1,196

Hi Colin,

I dont have the WLK1 Tcode.

Thank you,

Edson Luiz

Read only

0 Likes
1,196

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

Read only

0 Likes
1,196

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

Read only

0 Likes
1,196

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