cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

What is The Field Mapping of BAPI_REQUISITION_CRAETE ?

shahad009
Participant
0 Likes
1,847

Hello Experts,

I have created a program to create purchase requisition in mass.Below is my Selection screen.

Excel File has 4 fields material ,requisition quantity, Sales order, SO Item.

After giving these selection screen inputs PR Should be created.

I am using the Bapi : BAPI_REQUISITION_CREATE .

In the return tab showing error :

In the selection screen field IF Acct.cat is blank PR is created successfully

Below messages are showing based on data in selection screen field Acct.cat

If given F OR K

“Error in function can be made to G/L acct. 310370 in CoCode 8100”

If given C

“S not exist” ( Screen shot given in image file)

Accepted Solutions (0)

Answers (2)

Answers (2)

Sandra_Rossi
Active Contributor
0 Likes

Just to say, you should not focus on the code, you should focus on the values to pass to the BAPI.

If you know the right values to pass to the BAPI, the ABAP code will be easy.

You need methodology for calling BAPI "CREATE".

The most important rule to apply is to call the BAPI "GETDETAIL" from an existing template object to obtain the right parameters.

In your case, ask the functional guys to create a purchase request, obtain the parameters via BAPI_REQUISITION_GETDETAIL, and try then to create a clone via BAPI_REQUISITION_CREATE.

Only after a successful cloning, you can create the logic with loops, screen fields and so on.

jens_michaelsen
Participant
0 Likes

Please check if leading zeros are needed. If yes you must convert the material number with Funktion module convert exit alpha input

shahad009
Participant
0 Likes

The issue is resolved but now its showing another error

In the selection screen field IF Acct.cat is blank PR is created successfully

but if the value is C

Below messages are showing based on data in selection screen field Acct.cat

If given F OR K

“Error in function can be made to G/L acct. 310370 in CoCode 8100”

If given C

“S not exist” ( Screen shot given in image file)

err.png

Sandra_Rossi
Active Contributor
0 Likes

shahad009 Please embed the image in the comment or in the question e.g.

Note that you'd better choose the adequate data type for your internal table ERRMSG to avoid this very bad formatting.

Answers already exist about KO104 "Order & does not exist":