cancel
Showing results for 
Search instead for 
Did you mean: 

Error in PERFORM statement in SAPSCRIPT...

aris_hidalgo
Contributor
0 Kudos

Hello Experts, 

I am having an error in my code below:

SAPSCRIPT:

Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
DEFINE &LTYC_NAME1& = ''.
DEFINE &LTYC_NAME2& = ''.
DEFINE &LTYC_STR_SUPPL1& = ''.
DEFINE &LTYC_STR_SUPPL2& = ''.
DEFINE &LTYC_STR_SUPPL3& = ''.
DEFINE &LTYC_POST_CODE1& = ''.
DEFINE &LTYC_CITY1& = ''.
DEFINE &LTYC_BEZEI& = ''.
DEFINE &LTYC_LAND1& = ''.
PERFORM GET_VENDOR_DETAILS IN PROGRAM Z9999RFI_Z2574FFI_RA
USING &REGUH-LIFNR&
CHANGING &LTYC_NAME1&
CHANGING &LTYC_NAME2&
CHANGING &LTYC_STR_SUPPL1&
CHANGING &LTYC_STR_SUPPL2&
CHANGING &LTYC_STR_SUPPL3&
CHANGING &LTYC_POST_CODE1&
CHANGING &LTYC_CITY1&
CHANGING &LTYC_BEZEI&
CHANGING &LTYC_LAND1&
ENDPERFORM
&LTYC_NAME1&	&LTYC_NAME2&
&LTYC_STR_SUPPL1&
&LTYC_STR_SUPPL2&
&LTYC_STR_SUPPL3&
&LTYC_POST_CODE1&
&LTYC_CITY1&
&LTYC_BEZEI&
&LTYC_LAND1&
End of insertion DEVK940799 11/10/2008 DEL_HIDALGO


PROGRAM:

*&---------------------------------------------------------------------*
*& Report  Z9999RFI_Z2574FFI_RA
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  z9999rfi_z2574ffi_ra.

*&---------------------------------------------------------------------*
* Start of Selection event
*&---------------------------------------------------------------------*
START-OF-SELECTION.


*&---------------------------------------------------------------------*
*&      Form  get_vendor_details
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->IM_LIFNR       text
*      -->CH_NAME1       text
*      -->CH_NAME2       text
*      -->CH_STR_SUPPL1  text
*      -->CH_STR_SUPPL2  text
*      -->CH_STR_SUPPL3  text
*      -->CH_POST_CODE1  text
*      -->CH_CITY1       text
*      -->CH_BEZEI       text
*      -->CH_LAND1       text
*----------------------------------------------------------------------*
FORM get_vendor_details USING im_lifnr
                        CHANGING ch_name1      TYPE adrc-name1
                                 ch_name2      TYPE adrc-name2
                                 ch_str_suppl1 TYPE adrc-str_suppl1
                                 ch_str_suppl2 TYPE adrc-str_suppl2
                                 ch_str_suppl3 TYPE adrc-str_suppl3
                                 ch_post_code1 TYPE adrc-post_code1
                                 ch_city1      TYPE adrc-city1
                                 ch_bezei      TYPE bezei
                                 ch_land1      TYPE t005-land1.

  DATA: ltyc_adrnr TYPE lfa1-adrnr.

  SELECT SINGLE adrnr
    FROM lfa1
    INTO ltyc_adrnr
   WHERE lifnr = im_lifnr.

  IF sy-subrc = 0.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = ltyc_adrnr
      IMPORTING
        output = ltyc_adrnr.

    SELECT SINGLE name1 name2 str_suppl1
                  str_suppl2 str_suppl3 post_code1
                  city1
      FROM adrc
      INTO (ch_name1, ch_name2, ch_str_suppl1,
            ch_str_suppl2, ch_str_suppl3, ch_post_code1,
            ch_city1)
     WHERE addrnumber = ltyc_adrnr.
  ENDIF.
ENDFORM.                    "get_names

It says that there is an error in perform but they both have the same number of parameters.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry, Check the link Eric has posted below.

Regards

Karthik D

Edited by: Karthik D on Nov 10, 2008 7:48 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

JozsefSzikszai
Active Contributor
0 Kudos

the PERFORM statement works differently in SAPScript, pls. check in SAPHelp:

http://help.sap.com/saphelp_46c/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm

aris_hidalgo
Contributor
0 Kudos

Thanks again Eric!,

By the way, I am doing the check printing program for F110 and F-58. Is it ok to customize the standard program RFFOUS_C? And I was wondering on why some of my variables are not showing their values in my windows well in fact it has one when I debug the driver program and some appear as 'XXXXXXXXXX' in the layout...

JozsefSzikszai
Active Contributor
0 Kudos

What do you mean by "Is it ok to customize the standard program RFFOUS_C"? I think you only have to copy a standard SAPScript for checks (if there is any...) and modify it acc. to your requirements. In the system you can customize that the standard print program will call your Z... SAPScript.

On the other hand I believe that all variables you want to use in the SAPScript has to be defined in as global in the print program (except the ones, which you define in the script (with DEFINE))

Former Member
0 Kudos

And if you have decided to modify the Standard program then its time to move towards smartforms, as you can call your smartform from your Z program.

Regards

Karthik D