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

Call To perform from external program

Former Member
0 Likes
7,237

Hi ,

I have Perform in some Function (s_user_list) and i want to cal to this perform in other report,

I try like that but i get error ,what it can be?

REPORT  ztest_123.

......

PERFORM check_para  IN PROGRAM s_user_list
        USING  action <ls_details> 
        CHANGING  language lt_xp  lv_error_flag  lt_return .

THE ERROR :

(E) Das referierte Objekt "s_user_list

\FO:Check_para" existiert nicht oder ist keinem Paket

zugeordnet.

What i doing wrong?

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,199

Hi,

Is check_para the subroutine and s_user_list your program ?

If not try to put subroutine name and program name in variable and call as:

PERFORM (subroutine) IN PROGRAM (prog)

USING action <ls_details>

CHANGING language lt_xp lv_error_flag lt_return IF FOUND.

Add IF FOUND to avoid error if subroutine is not found.

Also ensure both variable contain names in UPPER CASE.

Revert with results.

11 REPLIES 11
Read only

Former Member
0 Likes
3,199

HI,

Try this way

PERFORM re501t(sapfhcmp) USING    sy-langu
                                      tcs_masterdata_wa-persg
                             CHANGING tcs_masterdata_wa-persg_text.

Read only

former_member156446
Active Contributor
0 Likes
3,199

I guess this type of calling other program's perform is obsolete.

I tried and it worked:

TABLES: mara.

SELECT-OPTIONS: s_matnr FOR mara-matnr.


PERFORM fr_get_data IN PROGRAM zprogram
 USING s_matnr.

Looks like s_user_list program is having some issue with the package its assigned to..

Read only

MarcinPciak
Active Contributor
0 Likes
3,199

    PERFORM ('CHECK_PARA') IN PROGRAM (prog)
                     USING  action <ls_details> 
                    CHANGING  language lt_xp  lv_error_flag  lt_return
                    IF FOUND.

Regards

Marcin

Read only

0 Likes
3,199

Hi Marcin,

What i have to put in (prog) ,the name of the external report ztest123 or the name of the function module that contain this perform?

PERFORM ('CHECK_PARA') IN PROGRAM (prog)

USING action <ls_details>

CHANGING language lt_xp lv_error_flag lt_return

IF FOUND.

Regards

Read only

Former Member
0 Likes
3,200

Hi,

Is check_para the subroutine and s_user_list your program ?

If not try to put subroutine name and program name in variable and call as:

PERFORM (subroutine) IN PROGRAM (prog)

USING action <ls_details>

CHANGING language lt_xp lv_error_flag lt_return IF FOUND.

Add IF FOUND to avoid error if subroutine is not found.

Also ensure both variable contain names in UPPER CASE.

Revert with results.

Read only

0 Likes
3,199

Hi Ankesh ,

check_para is perform in function module s_user_list,

and ztest_123 is new program that inside it i want to use PERFORM check_para.

REPORT ztest_123.

......

PERFORM check_para IN PROGRAM s_user_list

USING action <ls_details>

CHANGING language lt_xp lv_error_flag lt_return .

Regards

Read only

0 Likes
3,199

Try replacing "s_user_list" with the name of the global function group program (function pool), starting with SAPL...

Thomas

Read only

0 Likes
3,199

HI Thomas,

Thanks,

I try to change it to the name of the function group and it's not working.

Regards

Read only

0 Likes
3,199

Hi Michael,

Is s_user_list some standard FM??

If you open it through SE37 then please use following path:

Open FM s_user_list in SE37

GOTO tab Attributes --There in field for Program Name in General Data you will find the program name..

Use this program name while calling PERFORM... IN PROGRAM (above described prog)....

Revert if u need more clarification.

Read only

0 Likes
3,199

Not just the function group, but rather SAPL<name of group>

Thomas

Read only

former_member156446
Active Contributor
0 Likes
3,199

[More SAP help|http://help.sap.com/erp2005_ehp_04/helpdata/EN/9f/db978335c111d1829f0000e829fbfe/frameset.htm]