Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

HELP IN PERFORM

HI,

I Do this perform like below and i have to do the same perform exactly except the structre name that is cahnging.

do i have to build another Perform or i can avoid that with some technique ?

this is my perform :

PERFORM add_nodid TABLES node_tab pr_table cost_id.

*&---------------------------------------------------------------------*
*&      Form  ADD_NODID
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_NODE_TAB  text
*      -->P_PREVIOS_TABLE  text
*      -->P_COST_ID  text
*----------------------------------------------------------------------*
FORM add_nodid  TABLES   p_node_tab TYPE  zco_level2_ttype
                         p_pr_table STRUCTURE   zhr_level_2_month_str
                         p_cost_id LIKE  cost_id .

  FIELD-SYMBOLS: <fs_id> LIKE LINE OF cost_id ,<fs_node> LIKE LINE OF p_node_tab.
  DATA: wa_cost_id LIKE LINE OF cost_id.
  FIELD-SYMBOLS: <fs_add> TYPE zhr_level_2_month_str.


  LOOP AT p_node_tab ASSIGNING <fs_node>.
    SELECT SINGLE *
      FROM /bi0/hctcenter
      INTO CORRESPONDING FIELDS  OF wa_cost_id
      WHERE nodename = <fs_node>-znodename .
    IF sy-subrc = 0.
      APPEND wa_cost_id TO p_cost_id.
      CLEAR wa_cost_id.
    ENDIF.
  ENDLOOP.



  SORT p_previos_table BY dim0calmonth nodeid.
ENDFORM.    

What is changing is the :STRUCTURE zhr_level_2_month_str**

i wont to change it to zhr_level_2_quarter_str

and not build other perform.

Regards

Tags:
Former Member
replied

ok, in that case inside routine implementation how you going to handle differently the same internal table.

FORM add_nodid TABLES p_node_tab TYPE zco_level2_ttype
                                       p_pr_table         "Don't refer any structure here..
                                       p_cost_id LIKE cost_id .


endform.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question