Page 1 of 1

How to run a function module from sap

Posted: Thu Sep 08, 2005 1:23 pm
by koojo
How do we call a SAP function module from SAP?

Anybody's done this before.....Is this done from the ABAP extract pack....I have no idea on how to get started on this...... :oops:


Any suggestions?

Posted: Thu Sep 08, 2005 1:58 pm
by pnchowdary
Hi Koojo,

I think that you really meant to ask "How do we call a SAP function module from Datastage?"

You can not do this using ABAP extract pack, However there is another stage called PACK_for_SAP_R_3_BAPI which can be used to invoke the SAP function module using RFC.

Hope that helps.

Posted: Thu Sep 08, 2005 2:11 pm
by koojo
Thank you.....I need to dig into this. I have never used the BAPI stage and my understanding of the function module is not very good. Hopefully I will be able to move forward..... playing around with the BAPI module. I have that installed and the RFC listener.

Posted: Thu Sep 08, 2005 2:45 pm
by pnchowdary
cool :D . Best of Luck.

Re: How to run a function module from sap

Posted: Thu Oct 20, 2005 11:22 am
by racsingh
Hi,
Appologies for late assistance, hope by now you would have got enough experience on Bapi Stage.
Anyways check the below points to use Bapi Stage

1. Select Bapi stage. Connect Bapi stage with a Transforemer followed by a Sequential File. Bapi stage has no Input links in this case.

2. Select Bapi stage and Establish SAP connection.
3. Go to General Tab click on Bapi Explorer-> Select the Bapi you want. You will need to hunt for the Bapi you want.
for example: if you want to select Bapi_Company_Getdetail then select
CompanyCode then choose GetPeriod.
4. Move on to the next tab-> BAPI.
5. If in the Import Page the required parmeters are not in green then right click and activate them.
6. On the Export Page under BAPI tab, activate the parameters. Right click and activate.
7. Move on to the next tab: Read Logs. Here uncheck the Use Defaults box.
8. Specify the Input File path with file name in the Input file Box. Also specify the Log file path in the Location for Log files box.
Bapi will read your input files from this location.
9. Come to Transformer and drag all the Columns to the Outputl File.
10. Execute the job.

You will find your bapi has worked and the expected result is stored in the output file.

Cheers!!

Rachana Singh,
SAP-DataStage Consultant,
Capgemini India.

[quote="koojo"]How do we call a SAP function module from SAP?

Anybody's done this before.....Is this done from the ABAP extract pack....I have no idea on how to get started on this...... :oops:


Any suggestions?[/quote]

Posted: Thu Oct 20, 2005 4:48 pm
by ray.wurlod
No provision exists for invoking DataStage from SAP R/3. The only thing even resembling this is that you can specify "push" or "pull" for accessing data.

Posted: Thu Nov 17, 2005 11:48 am
by vinaymanchinila
Trying to figure out what's the format of the Input.txt , we have 3 parameters param1, 2,3 .


Tried this format in the file ...
Param1
Param2
Param3


Does not work !