How to run a function module from sap

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

How to run a function module from sap

Post 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?
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post 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.
Thanks,
Naveen
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

Post 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.
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

cool :D . Best of Luck.
Thanks,
Naveen
racsingh
Participant
Posts: 10
Joined: Tue Sep 06, 2005 6:35 am

Re: How to run a function module from sap

Post 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]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post 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 !
Post Reply