Application Development and Automation 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: 
Read only

function-module

Mohamed_Mukhtar
Active Contributor
0 Likes
673

hi,

Is there any standard program to import/export function modules , like Script(RSTXSCRP).

If yes , please give me the name of the standard program and porcedure..

Waiting for your valuable reponses..

With Warm Regards..

Always Learner

7 REPLIES 7
Read only

Former Member
0 Likes
651

I dont think there exists any standard function module for doing that.

Read only

Sm1tje
Active Contributor
0 Likes
651

Import into what?

Export to where?

Read only

Former Member
0 Likes
651

since he/she mentioned RSTXSCRP, I guess the guy wants to import/export to/from the local system and I dont there exists any standard FM for that. Please correct me if I am wrong.

Read only

Sm1tje
Active Contributor
0 Likes
651

The report he/she is mentioning, is used to transport documents, styles, scripts, from client 000 into your development client for example. This does not apply to function modules. Standard SAP function modules are available in all the clients and all the systems (development, test, quality and production). If you create a new one, a transport request is created and you can transport it via the standard method.

If he/she wants to export/import FM from his/her system into another system which is not part of the regular transport route, he/she can still use the transport request for this or use SAPlink tool (search SDN for this).

So, I'm not quite sure what the exact requirement is.....?

Read only

0 Likes
651

thanks for ur responses,

Yes , i want to transport this Zfunction module to/from one sytem to other...

Is there any way to do this.....

Guys ,

Can i do error handling in source code of function module..

if yes , please give a pseudo code...

Thank You

Read only

Sm1tje
Active Contributor
0 Likes
651

Two methods (I know of):

1. Use the transport request if available. Retrieve the data- and co files from the SAP System. Not quite sure what the exact path is however. should be able to find out via SDN. Copy those from your system into the same folders from other system and import them via transaction STMS.

BTW: Is this other system NOT part of the regular transport route like in Development, Test, Quality and Production? If so, use the regular transport method. Create transport request, add development objects, release request (SE09) and import request in other system (STMS).

2. use SAP Link. Search on SDN and install it.

Error handling in FM is possible.

Define an exception in your FM (tab exceptions), for example NOT_FOUND.

In your FM you do a select on a table and if the return code <> 0, you can raise exception NOT_FOUND. The calling application will now get a return code = 1, which equals NOT_FOUND.

example.

select * from mara into ls_mara where matnr = '1234'.

if sy-subrc <> 0.

raise NOT_FOUND.

endif.

Edited by: Micky Oestreich on Aug 16, 2008 2:20 PM

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
651

Thanks ,