Application Development 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: 

Problem when error message in exit Save document prepare(MV50AFZ1) on PGI

Former Member
0 Kudos

Hi,

I am using USER_EXIT_DOCUMENT_PREPARE for throwing error message during PGI. The error triggers properly, But after that if I press enter button, The program ends with an ABEND error 'Risk of posting several mat.documents for one delivery->long text'.

If anyone come across with this please help me.

Thanks in Adv.

Regards

Nishad

4 REPLIES 4

venkata_ramisetti
Active Contributor
0 Kudos

Hi,

May be you are clearing the existing details before you are triggering error.

Check any data from tables like VBAP, VBAK is being cleared in you exit.

Can you please put the code in your post?

Thanks,

Ramakrishna

0 Kudos

Hi,

I am not clearing any tables , there is a check where any BOL lading is entered or not, if not entered then throw the error message. I think when i debugged, in standard code they is a flag check

if wa_zaehl > 0 and "WA-Zaehler noch Null?

fcode(4) <> 'SIC1' and "und FCODE nicht 'Sichern'!!!

fcode(4) <> 'LT06'. "und FCODE nicht 'LT06'

message a621. "wenn nein, Abbruch!!!

endif.

in include MV50AF0F_FCODE_BEARBEITEN causes problem, This flag is set after successful creation of voucher.

I am not sure how can this be tackled.

Thanks for your reply.

Nishad

0 Kudos

Hi,

Please make sure that it is not a data issue by chekcing the below step.

Comment your code and check with the data whether you are able to save document.

If you are not able to save the document with the same data then it is data issue.

Thanks,

Ramakrishna

venky1
Explorer
0 Kudos

Hi,

Just implement the BADI LE_SHP_GOODSMOVEMENT, and populate the ct_log parameter with the error message in the implementation class method IF_EX_LE_SHP_GOODSMOVEMENT~CHANGE_INPUT_HEADER_AND_ITEMS. It perfectly works, without any issues.