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

FORM - PERFORM question

andrew_jacobs2
Participant
0 Likes
583

Hello,

Is it possible to code a FORM - PERFORM so both an internal table and 2 other parameters can be passed?

I can pass a table or parameters but I can't figure out how to do both in the same FORM - PERFORM.

Thx.

Andy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
554

yes you can...

Please look the below code



tables : marc.

data :
    lt_data type standard table of marc.

constants :
      c_matnr(18) type c value '10000',
      c_werks(10) type c value '0010'.

 perform det_data using c_matnr
                        c_werks
                  changing lt_data.
*&---------------------------------------------------------------------*
*&      Form  det_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_C_MATNR  text
*      -->P_C_WERKS  text
*      <--P_LT_DATA  text
*----------------------------------------------------------------------*
form det_data  using    p_c_matnr
                        p_c_werks
               changing p_lt_data.
               
  " you can write the code here "

endform.                    " det_data

please let me know if you need further info

Regards

Satish Boguda

3 REPLIES 3
Read only

guilherme_frisoni
Contributor
0 Likes
554

Hi,

sure you can. One way is to create a table type, or even using TABLES and USING/CHANGING in your form.

Example:


TYPES: BEGIN OF ys_lote_comp,
         charo TYPE ztbmm_030-charg,
         chard TYPE ztbmm_030-charg,
       END OF ys_lote_comp,
       yt_lote_comp TYPE STANDARD TABLE OF ys_lote_comp.
FORM zf_movimento_lote_comp
  USING lt_lote_comp TYPE yt_lote_comp,
        lc_error TYPE c.
ENDFORM.

Regards,

Frisoni

Read only

Former Member
0 Likes
555

yes you can...

Please look the below code



tables : marc.

data :
    lt_data type standard table of marc.

constants :
      c_matnr(18) type c value '10000',
      c_werks(10) type c value '0010'.

 perform det_data using c_matnr
                        c_werks
                  changing lt_data.
*&---------------------------------------------------------------------*
*&      Form  det_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_C_MATNR  text
*      -->P_C_WERKS  text
*      <--P_LT_DATA  text
*----------------------------------------------------------------------*
form det_data  using    p_c_matnr
                        p_c_werks
               changing p_lt_data.
               
  " you can write the code here "

endform.                    " det_data

please let me know if you need further info

Regards

Satish Boguda

Read only

Former Member
0 Likes
554

Moderator message - Please do not ask or answer basic questions - thread locked

Rob