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

Problem in BAPI_REQUISITION_CREATE

Former Member
0 Likes
1,306

Dear All,

I am facing problem during Purchase requisition create with the help of BAPI BAPI_REQUISITION_CREATE.When I take material in file text format like(SANDERKOKS) then it will pick and it gives appropriate result.

But when I take alphanumeric material then it is not giving result.

I took data type of internal table field is charectar(18).but still it is giving problrm.

REgards,

AMAR

1 ACCEPTED SOLUTION
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,234

Hi,

Thats really strange.

I also had a similar issue when i had to pass MATNR as R12345, the BAPI was working perfectly fine in my case.

What all parameters are you passing..?

Regards,

Tarun

8 REPLIES 8
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,235

Hi,

Thats really strange.

I also had a similar issue when i had to pass MATNR as R12345, the BAPI was working perfectly fine in my case.

What all parameters are you passing..?

Regards,

Tarun

Read only

Former Member
0 Likes
1,234

This is my code.Please check and tell me

LOOP AT IT_DATA.

REFRESH IT_MAKT.

CONCATENATE IT_DATA-DEL_DT6(4) IT_DATA-DEL_DT3(2)

IT_DATA-DEL_DT+0(2) INTO V_DATE.

CONCATENATE '00' IT_DATA-PREQ_NO INTO V_PERRQ.

IT_MAKT-PREQ_NO = V_PERRQ .

IT_MAKT-DOC_TYPE = IT_DATA-DOC_TYP.

IT_MAKT-PREQ_ITEM = IT_DATA-PERQ_IT.

IT_MAKT-MATERIAL = IT_DATA-MATNR .

IT_MAKT-QUANTITY = IT_DATA-QUANT .

IT_MAKT-UNIT = IT_DATA-UNIT .

IT_MAKT-PLANT = IT_DATA-PLANT .

IT_MAKT-STORE_LOC = IT_DATA-STO_LC .

IT_MAKT-DELIV_DATE = V_DATE .

APPEND IT_MAKT.

CALL FUNCTION 'BAPI_REQUISITION_CREATE'

EXPORTING

SKIP_ITEMS_WITH_ERROR = ' '

AUTOMATIC_SOURCE = 'X'

  • IMPORTING

  • NUMBER =

TABLES

REQUISITION_ITEMS = IT_MAKT

RETURN = BAPI_RETURN

.

IF SY-SUBRC = 0.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

  • IMPORTING

  • RETURN =

.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,234

hai amar,

why dotn u define the material number as type matnr instead of 18 characters as matnr has conversion routine attached to it and it will conevr into internal format

and what is the error ur getting when executing the bapi , u should get some error just tell the error

m.a

Read only

Former Member
0 Likes
1,234

Hi M.A,

I have used matnr data type but still I am facing same problem.

I am getting following error:

The material 1041638 does not exist or it is not activated.

But when I do with bapi manually then it is not showing any error.

Regrads,

Amar

Read only

Former Member
0 Likes
1,234

hai amar,

does the maretial exist in ur system , it is due to conversion exit problem

as ur trying from bapi it is working and when u use in code it is not working it is deu to conervsion problem just use a conversion exit to convert it into internal number and then pass to bapi

just try to append zeros before the material number in debug and try u will come to know the problem

hope it will solve ur problem

regards

m.a

Edited by: mohammad afzal on Jun 23, 2009 10:13 AM

Read only

Former Member
0 Likes
1,234

Thanks Mohammad,

While debugging I tried and it is ok.When I append zeros before material number then it is not showing any error message.Thanks for that.

Could you please give me the favour that give me the conversion exit name.

Regards,

Amar

Read only

Former Member
0 Likes
1,234

hai amar

try this conversion exit

CONVERSION_EXIT_MATN1_INPUT

regards

m.a

Read only

Former Member
0 Likes
1,234

Hi ,

Conversion_exit_alpha_input &

Conversion_exit_alpha_output

Thanks & Regards,

Ruchi Tiwari