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: 

RSNAST00 Concern?

Former Member
0 Kudos
1,204

Hi..

I want to know how RSNAST00 calls the respective function module in the ABAB Coding.?

For Example in case of say any Delivery Document Number, when we run RSNAST00 for it giving the proper message type(say in our case LD00 with ALE as a medium)then at what point of time is the function module (say IDOC_OUTPUT_DELIVRY)called in that program. I didnt see a direct call of the function module as such in the program.

I hope I have made myself clear in framing a question.

Thanks.

6 REPLIES 6

Former Member
0 Kudos
207

Subhash,

I can tell you that this will NOT be easy as this will be dynamic call. As the same program RSNAST00 is used for all the message types and it calls different functions for different message types, at runtime it figures out which function needs to be called and calls that.

regards,

Ravi

Note : Please mark the helpful answers

Former Member
0 Kudos
207

HI

GOOD

GO THROUGH THESE LINKS ,I HOPE THIS WILL GIVE YOU SOME MORE IDEA TO SOLVE YOUR PROBLEM,

http://idocs.de/www5/books/IDocBook/IDOCS_CHAP09-11.pdf

http://idocs.de/cookbooks/idoc/cb12_idoc_20_outbound/idoc_outbound_45_rsnast00/docu.htm

THANKS

MRUTYUN

Former Member
0 Kudos
207

Hello Subhash,

The process is like this...

When u run RSNAS00 program, line 179 it reads table TNPAR for output type/medium and application. In ur case it will read for LD00/A/V2, it will get the program name and the routine to execute form the program. Mostly it is RSNASTED and ALE_PROCESSING will be the entry point. Then from line 875 it will make entry into the RSNASTED program and in this program it will call ur FM.

Former Member
0 Kudos
207

Hi subhash,

1. I didnt see a direct call of the function module as such in the program.

Yes you are right!

The call is not made directly from

the program

(other wise this program will not be of multi-use)

2. As u might be knowing,

All the FM for IDOC (inbound/outbound)

have to follow the same

set of IMPORT/EXPORT/TABLES

format.

Only the Function name changes.

3. So, there is one standard sap table,

in which, the process code and idoc combination,

ONE FUNCTION NAME is defined there.

4. So the RSNAST00 pickups the function name from there,

and calls the function name dynamically,

with the PRE-DEFINED SET OF

IMPORT/EXPORT/TABLES parameters !

regards,

amit m.

Former Member
0 Kudos
207

Hi Subhash,

RSNATS00 program is called dynamically. Whenever you change or create any document for which output type is configured. An entry is made in the table NAST with key Object key OBJKY and Message Type and Application. Your Object Key is the document number. Based on these parameters RSNAST00 program will pick up the record for processing Outbound IDOC and then RSNASTED program with Output Type (6) is called for creating the outbound IDOC.

Please reward in case you find the reply useful.

Cheers,

Vikram

Former Member
0 Kudos
207

Hi Subhash,

As most of reply said, RSNAST00 will call the subroutine ALE_PROCESSING or EDI_PROCESSING in the program RSNASTED. But this is link is defined in your message determination .. If you know place where you maintain the Program name script name for Printing the documents with output type.. it is the same place you maintian the subroutine and program (i.e. ALE_PROCESSING or EDI_PROCESSING in the program RSNASTED based on the output medium; A- Ale, 6-EDI).

So when you run RSNAST00, it basically selects all the output records ready for procesing from NAST table based on the seletion parameters you have give. From there it identifies the program and subroutine to be called, calls that particular subroutine (for printing it will be your ENTRY subroutine in Driver program) with the Nast record. RSNAST00 Job is done once it calls the subroutine..

Now the Subroutine being called takes the job of printing/faxing/ creating & sending the iDoc.

In case of ALE/EDI, your ALE_PRocessing & EDI_procssing routine determines the FM to be called in the following way.

It picks up the Message partner from the NAST record and check whether there is partner profile defined for that in WE20. If not defined error.. if defined, it will determine the FM to be called based on information given in the Output control tab and processed code give there (Process code is linked to your FM that fill the iDoc). Then it passes the iDoc internal table to ALE layer for further processing which stores that on DB and sends it our bsed on the WE20 configuration..

Hope this gives you the clear picture about how the iDoc is generated from output control.

Regards,

Nagaraju Chidurupalli.