‎2009 Jun 18 12:12 PM
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
‎2009 Jun 18 12:16 PM
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
‎2009 Jun 18 12:16 PM
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
‎2009 Jun 18 12:18 PM
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.
‎2009 Jun 18 1:07 PM
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
‎2009 Jun 23 8:52 AM
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
‎2009 Jun 23 9:11 AM
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
‎2009 Jun 23 10:24 AM
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
‎2009 Jun 23 10:39 AM
hai amar
try this conversion exit
CONVERSION_EXIT_MATN1_INPUT
regards
m.a
‎2009 Jun 23 10:32 AM
Hi ,
Conversion_exit_alpha_input &
Conversion_exit_alpha_output
Thanks & Regards,
Ruchi Tiwari