Skip to Content
0
Former Member
Aug 31, 2008 at 10:07 AM

HELP IN PERFORM

11 Views

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