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: 

Is it safe/okay to use RSNAST00 program in a user-exit?

former_member202077
Participant
0 Kudos

Hi Experts,

I got a business requirement and its:

After SAVEing the sales order......by using the user-exit USEREXIT_SAVE_DOCUMENT I have to trigger custom IDOC (currently its in the system and using for some other application) outbound direction to XYZ logical system.

But, the functional spec is asking me to to use RSNAST00 program in the above said user-exit.

So pls clarify,

1) Is it safe to use this RSNAST00 program in the user-exits?

2) If so, Wht is the best/safest approach to use it? is it by using SUBMIT AND RETURN statement? or do we have any other?

3) Actually, guess this is not good approach (achieving via ABAP workbench/triggering IDOC outbound by custom code of user-exit) to meet this functionality.......its a configuration task need to done by functional guy.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You should not use RSNAST00 in the user exit mentioned by you. RSNAST00 commits the transaction (see Line number 202, 204) , which should not be done in the user exits.

Regards

Vinod

5 REPLIES 5

anup_deshmukh4
Active Contributor
0 Kudos

Hello ABAP_SAP_ABAP .

Yes you are correct a output type in NACE should be configured by your functionl

and ABAP Should write a a FM to trigger the idoc.

and then assign the the output type with the FM so that the log and all are mantained.

( Yes of course..you can achive in exit....but again ABAP would have may overheads )

Former Member
0 Kudos

Hi,

You should not use RSNAST00 in the user exit mentioned by you. RSNAST00 commits the transaction (see Line number 202, 204) , which should not be done in the user exits.

Regards

Vinod

0 Kudos

Thank you Vinod.

If thats the ONLY concern, then I can write a seperate FM, where in I will use SUBMIT RSNAST00 AND RETURN statements, and I will call this FM in a SEPERATE / BACKGROUND TASK, which works in a seperate LWU.

Pls. shade some light

Thank you

0 Kudos

Yes that should be ok. Its a very common practice to create a custom program which in turn calls RSNAST00 using SUBMIT & RETURN.

Thanks,

Best regards,

Prashant

0 Kudos

Hi,

But if you are looking for a standard way of triggering an idoc while saving a standard transaction, then configure the output type (Transaction code NACE) which creates an idoc.

Regards

Vinod