on 2023 Dec 31 3:14 AM
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)
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check if leading zeros are needed. If yes you must convert the material number with Funktion module convert exit alpha input
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
| User | Count |
|---|---|
| 33 | |
| 18 | |
| 14 | |
| 13 | |
| 9 | |
| 4 | |
| 3 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.