on 02-09-2018 4:50 AM
Hi All,
I get dump SAPSQL_ARRAY_INSERT_DUPREC when i am creating purchase info record using FM 'ME_POST_INFORECRD' in a program. Multiple material can be given as input and multiple info records will be created in one execution. Materials will be looped one by one. For the first material, Info record gets created successfully. But, from the second material on wards, it starts to throw error 'Inserting duplicate record to A017 table'. In the dump details of the second material, i can see the first material and not the second one. Seems like some buffer data issue.
Kindly advise to rectify this .
Thank you,
Eldho
When using unreleased (*) FM always perform a where-used search and replicate behavior of standard class/program, your code could look like
CALL FUNCTION 'ME_INITIALIZE_INFORECORD'.
CALL FUNCTION 'RV_CONDITION_RESET'
EXPORTING
free_memory ='X'.
CALL FUNCTION 'ME_POST_INFORECORD'
TABLES
t_eina_i = lt_eina
EXCEPTIONS
error_message = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = lt_bapiret2.
REFRESH lt_eina.
Add the requested check/catch for error handling too.
(*) Actually do it also for released ones...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try calling ME_INITIALIZE_INFORECORD before calling ME_POST_INFORECORD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.