How can i use reuse_alv_fieldcatalog_merge function module

I am using below steps for populating the final internal table.How can I use reuse_alv_fieldcatalog_merge function module in the place of declaring all these fields.How canI put title of the report in reuse_alv_fieldcatalog_merge function module.
FORM BUILD_FIELDCATALOG .
  FIELDCAT-TABNAME   = 'IT_FINAL'.
  FIELDCAT-FIELDNAME = 'KUNNR'.
  FIELDCAT-SELTEXT_M = 'Customer Name'.
  FIELDCAT-JUST      = 'L'.
  FIELDCAT-KEY       = 'X'.
  FIELDCAT-DATATYPE  = 'C'.
  APPEND FIELDCAT TO I_FIELDCAT.
  CLEAR FIELDCAT.
  FIELDCAT-TABNAME   = 'IT_FINAL'.
  FIELDCAT-FIELDNAME = 'VBELN'.
  FIELDCAT-SELTEXT_M = 'Invoice Reference'.
  FIELDCAT-JUST      = 'L'.
  FIELDCAT-KEY       = 'X'.
  APPEND FIELDCAT TO I_FIELDCAT.
  CLEAR FIELDCAT.
  FIELDCAT-TABNAME   = 'IT_FINAL'.
  FIELDCAT-FIELDNAME = 'VKBUR'.
  FIELDCAT-SELTEXT_M = 'Sales Office'.
  FIELDCAT-JUST      = 'L'.
FIELDCAT-KEY       = 'X'.
  FIELDCAT-DATATYPE  = 'C'.
  APPEND FIELDCAT TO I_FIELDCAT.
  CLEAR FIELDCAT.
  FIELDCAT-TABNAME   = 'IT_FINAL'.
  FIELDCAT-FIELDNAME = 'VKGRP'.
  FIELDCAT-SELTEXT_M = 'Sales Person'.
  FIELDCAT-JUST      = 'L'.
FIELDCAT-KEY       = 'X'.
  FIELDCAT-DATATYPE  = 'C'.
  APPEND FIELDCAT TO I_FIELDCAT.
  CLEAR FIELDCAT.
  FIELDCAT-TABNAME   = 'IT_FINAL'.
  FIELDCAT-FIELDNAME = 'POSNR'.
  FIELDCAT-SELTEXT_M = 'Item No'.
  FIELDCAT-JUST      = 'L'.
  FIELDCAT-KEY       = 'X'.
  APPEND FIELDCAT TO I_FIELDCAT.
  CLEAR FIELDCAT.
  FIELDCAT-TABNAME   = 'IT_FIANL'.
  FIELDCAT-FIELDNAME = 'ARKTX'.
  FIELDCAT-SELTEXT_M = 'Item Description'.
  FIELDCAT-JUST      = 'L'.
  FIELDCAT-DATATYPE  = 'C'.
  APPEND FIELDCAT TO I_FIELDCAT.
  CLEAR FIELDCAT.

Hello,
It is very easy to use reuse_alv_fieldcatalog_merge.
You try this it will work.
example
data:
DATA : gv_repid        TYPE syrepid VALUE sy-repid .  " Report id
  PERFORM set_field_catalog USING gst_struct CHANGING lst_fieldcat.
FORM set_field_catalog  USING uv_tab TYPE slis_tabname
                     CHANGING  xt_fieldcatalog TYPE slis_t_fieldcat_alv.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = gv_repid
      i_internal_tabname     = uv_tab
      i_inclname             = gv_repid
    CHANGING
      ct_fieldcat            = xt_fieldcatalog
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.                    " set_field_catalog_spec

Similar Messages

  • How can i use this  function module

    Hai
    How can i use this function module /SAPHT/SALES_ORDER_READ, already apply the some parameters in this function module, but it shows the error , please tell me, how to declare the parameters in this function module ,
    thanks
    neelima

    Hi
    For a particular sales order,you have to pass the order number and the item number in the sales order.
    It will display the rest of the values which u can capture them using internal tables.
    Regards,
    Vishwa.

  • How can we use SX_OBJECT_CONVERT_OTF_INTO_PDF function module IN SCRIPT

    Hi Gurus,
    can any one inform me,how to use  SX_OBJECT_CONVERT_OTF_INTO_PDF  function module in script..
    how can we convert  the script output into pdf file format....
    i need your help......plz
    my mail id : [email protected] 
    Thanks,
    Rajkumar.A
    Edited by: rajkumar annadurai on Feb 19, 2008 10:25 AM

    Hi, Dear
    In XI 3.0 we are tyring to setup SAPconnect;
    1 Step; Create RFC connection for Mlunxsnd file, anyway!!! we download thease file and create RFC connection; fine working no error
    2 Step: Create Nodes T-code SCOT => connection INT => and support address type like Internet its just show only "PDF, HTM, TXT" thats it its not show some others format
    3. Step; When check email T-code SOST Getting an error messages: "Connot process message in node, parameters cannot be converted"
    4. In R3 RPD and Others system when I check format its ok its show some others format which is support to be such as "ALI, OBJ, OTF, SCR, URL" ...
    How may install these format in XI 3.0
    Please Advice I will be really appriciated
    Thanks a lot
    Travis

  • How can I use the print module to print different size images on one large "canvas"?

    How can I use the print module to print different size images on one large "canvas"? An example would be in Photoshop, go to file>new, and create the size paper I want, and move images of different sizes onto it.
    I was thinking the print module would do this automatically for me.

    You can't, at present. It's been a requested feature, so we'll see if it shows up in a future version, but it's not there at present.

  • How can I use 3D function in Photoshop CS6 (student package)?

    Please let me know how can I use 3D function in Photoshop CS6 (student package)?
    Thanks,

    Thanks so much for your helpful reply.
    Now I' ve already installed Adobe Creative Suite 6 Production Premium (Student Package), Extended included. But when I open Photoshop CS6, there' s still no 3D function in menu bar.
    Would you please tell me how to activate this function?
    Thanks,

  • How to avoid use of function module in case of background jobs?

    Hi ,
           I am working a file tranfer interface .Functionality is to extract file either apllication or presentation server , and process the file  through bapi , send the  result in their respective server. This program should run through batch jobs in background mode.
    I am using following function module :
      SUBST_GET_FILE_LIS : Get the file list from application server
    TMP_GUI_DIRECTORY_LIST_FILES : Get the file list from presentation server
    GUI_UPLOad : to extract file data   from presentation server
    GUI_downLOAD : to download data  to presentation server
    in case of background job these function modules will not work.... so how to resolve this issue...
    what are the methods we can apply?
    Thanks & Regards
    Sandeep

    Hi,
    This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server.  There is no way , by which you can process presentation server files in background mode.
    Regards
    Vinod

  • How can i use a function in a create table?

    I have done one funtion to do one check in a create table statement, but i don't know where to use it. How can I use it?

    I have the function:
    CREATE OR REPLACE FUNCTION verificar_NIF (nif varchar2) return boolean as
    l_check_digit constant varchar2(23) := 'TRWAGMYFPDXBNJZSQVHLCKE';
    l_mod number;
    l_result varchar2(1);
    l_return boolean := false;
    begin
    l_mod := mod(substr(nif, 1, 8), 23);
    l_result := substr(l_check_digit, l_mod+1, 1);
    if l_result = substr(nif, 1, 9) then
    l_return := true;
    end if;
    return l_return;
    end;
    And I have the table:
    CREATE TABLE Clients (
         id_client NUMBER(5) PRIMARY KEY,
         nif VARCHAR2(9),
         cog1 VARCHAR2(50) NOT NULL,
         cog2 VARCHAR2(50) NOT NULL,
         nom VARCHAR2(50) NOT NULL,
         adre VARCHAR2(50) NOT NULL,
         Poblacio VARCHAR2(40) NOT NULL,
         CONSTRAINT err_NIF CHECK ( verificar_NIF(nif)=true )
    I want the var nif to have a concert value. It is correct to check in that way?

  • How can I debug a Function Module used by smartforms

    Hello everyone,
    i have a problem with the function module /1BCDWB/SF00000040.
    It's a module executed from a smartforms form. I need to debug this
    function module while printing an invoice. While printing it should jump
    to the place of the function module.
    Would be grateful if someone could help me.
    Best regards
    F. Hoppe

    This is exactly what i have done last time.
    The problem is that the breakpoint does not stay at the same place
    when i activate it in the module itself.
    Isn't there a transaction you can put breakpoints specific to a FM?

  • How can I use the function keys in a GUI with swing?

    I'm wondering how do you declare you want an action to happen when a user uses a function key or any key for that matter. How can you specify something frame wide or for that matter for a specific jtextbox?

    you need to use an accelerator
    setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)

  • How can I use AGO function with aggregates

    I use aggregated table and a detailed table
    I have time hierarchy whose lowest level is date. For sales I
    created year-to-year (YTD) comparision with AGO function. It
    works OK.
    BUT, I want to speed it up, so I used aggregates. I created new
    time table grouped by MONTH and corresponding agg_SALES table. I
    created connections and mapped the fields. It works OK for
    normal queries, that means my queries at month level use
    aggregates. BUT when I add YTD measures or YAGO measure in query, it goes to
    then SALES table whose grain is date.
    How can I force BI Server to use AGO function with aggregates?
    I use OBIEE 10.1.3.4
    Thank you
    Ishaq
    (Question originally taken from ITtoolbox and posted by Gorazd)
    SORRY - THE QUESTION IS IN THE WRONG FORUM
    Edited by: ishaq12 on Nov 19, 2008 12:21 PM

    Hi,
    you can not do it in Administration tool but you can set agregation for that field in Answers (fx->Agregation rule->Sum) and effect should be the same. Note that it may not work properly on Oracle 10g as generated SQL is not 100% recognized, on 11g everything is OK (at least in my case).
    Regards,
    Marko
    Edited by: user10449532 on 2008.11.19 06:29

  • How can I  call the function module of the ECC when I save the campaign?

    HI Experts!
    I want to call function module of the ECC when I click the save button in the campaign view,A badi or userexit is needed,but I don't find, can you tell me which badi or userexit  is used to implement?

    Thanks a lot.
    I have tried,but it can't do.
    who can tell me which badi and detailed implementation step?
    waiting on line.

  • How can i found associated Function module in IDOC

    Hi all
    my outbound idoc is QPMK how can i found the associated function module for this idoc

    Hi,
    you can get it from table EDIFCT table, give idoctype and get it.
    for your case it is <b>BAPI_IDOC_INPUT1</b>
    Regards
    vijay

  • How can I use CVI function TS_PropertyExists in Full-Featured Operator Interface

    I'm trying to use the CVI function
    HRESULT CVIFUNC TS_PropertyExists (CAObjHandle objectHandle, ERRORINFO *errorInfo, const char *lookupString, long options, VBOOL *val)
    in full-featured operator interface source code shipped with TestStand 3.1. I have problem with the objectHandle parameter which I don't know how to use. Is there already a variable declared and initiliased in operator interface source code which corresponds the objectHandle parameter ? If not, how can I get an objectHandle ?
    /Petri

    Petri,
    The object handle parameter is the ActiveX object handle obtained from Automation Method or property.
    This object would depend on which property you want to check for existence.
    Check the Using LabWindows/CVI with TestStand reference manual for more information.
    Best Regards.

  • How can we use DECODE function in where clause.

    Hi Guys,
    I have to use DECODE function in where clause.
    like below
    select * from tab1,tab2
    where a.tab1 = b.tab2
    and decode(code, 'a','approved')
    in this manner its not accepting?
    Can any one help me on this or any other aproach?
    Thanks
    -LKR

    >
    I am looking for to decode the actual db value something in different for my report.
    like if A then Accepted
    elseif R then Rejected
    elseif D then Denied
    these conditions I have to check in where clause.
    >
    what are you trying to do?
    may be you are looking for
    select * from tab1,tab2
    where a.tab1 = b.tab2
    and
       (decode(:code, 'A','Accepted') = <table_column>
        or
        decode(:code, 'R','Rejected') = <table_column>
       or
        decode(:code, 'D','Denied') = <table_column>
       )

  • How can I use SUM function to calculate # of employees in the comp.&deptnt?

    I've got two tables: employee & department. I am trying to calculate total employees by department and total employees by the entire company. I know I need to use SUM function, but I only can calculate total employees by department & by company separately. I need to get this output:
    DEPT_NAME     DEPT_TOTAL_SALARY         COMPANY_TOTAL_SALARY
    RESEARCH                  10875                        29025
    SALES                      9400                        29025   
    ACCOUNTING                 8750                        29025     
    This is my code:
    SELECT department_name, SUM(salary) as total_salary
    FROM employee, department
    WHERE employee.department_id = department.department_id
    GROUP BY department_name;
    SELECT SUM(salary)
    FROM employee;
    Can somebody help please?
    Thank you in advance.Edited by: user13675672 on Jan 30, 2011 2:29 PM
    Edited by: user13675672 on Jan 30, 2011 2:31 PM

    Hi, Peter
    Peter Gjelstrup wrote:
    ... There might be a smarter way, with no re-select.You're right, as usual.
    SELECT       d.dname
    ,       SUM (e.sal)               AS dept_tot_sal
    ,       SUM (SUM (e.sal)) OVER ()     AS comp_tot_sal
    FROM       scott.dept     d
    JOIN       scott.emp     e  ON     d.deptno     = e.deptno
    GROUP BY  d.dname
    ;Analytic functions are computed after aggregate functions, so an aggregate function can be nested inside an analytic function.
    Another way (without a sub-query, at least) would be SELECT DISTINCT, with only analytic functions.
    SELECT DISTINCT
           d.dname
    ,       SUM (e.sal) OVER (PARTITION BY  d.dname)     AS dept_tot_sal
    ,       SUM (e.sal) OVER ()                    AS comp_tot_sal
    FROM       scott.dept     d
    JOIN       scott.emp     e  ON     d.deptno     = e.deptno
    ;

Maybe you are looking for

  • How can I pass value between two pages or fragments?

    Hi, I am learning ADF nowadays. Now I come across the following problem. There are two pages or fragments in a bounded task flow, e.g. PageA&PageB. There is an inputtext on PageA.When I press an button on PageA with an action jumpping to PageB I want

  • PowerMac G5 will not start up.

    Hello, I have a PowerMac G5 2.5GHZ Dual Processor (June 2004) that will not boot past the grey apple screen. It will not get to a second chime by holding Command-Option-P-R at startup. If I start up using Command-Option-O-F and enter reset-nvram (ret

  • Partner Profile in Idoc

    Hi ,   I have created a partner profile of type logical system. If i dont specify anything in the inbound parameters and send an idoc to this partner profile then how would the system respond. Regards Arun

  • Finder window not appearing when selected from the Dock

    Hi My Finder exhibits the following behavior: Right Click Finder in Dock Finder displays list of currently open windows, etc. I select one of the windows Nothing happens Note: If a select "New Finder Window" a new window is opened.  This has become m

  • Sales Commission Pay Sheet

    I need to build a sales commission pay sheet that bases the commission rate per item on the total sales volume for the week.  We use three rate tables based on 0 to 14 sales, 15 to 24 and 25 or more.  Any ideas