Need help on interactive report parameter value based on  a sequence

At a press of a button..
i have a form where i insert data in a table .a unique number is generated via sequence.
And then a report is called .. all at the press of the same button
Now i need to make a query such that
select * from table_name where no1 = (select d_table_name_seq.currval from dual);
Such statement is not possible in apex..
So what should i do ..Use page_items
How can i store the sequence value in a page item
Edited by: susf on Nov 29, 2012 6:32 AM

ok solved..using apex application item thanks

Similar Messages

  • NEED HELP FOR INTERACTIVE REPORT..PARAMETERISED

    I have a report which output is displayed after a field is selected from select list..
    The output of query is empty ..
    This is the query .... it doesnt work when i try to put the value of variable in other page...and call it from the query like below..
    select apex_item.checkbox(1,ai.ino,'CHECKED') " ",ai.advtno,findisname(ai.adissue) issue_name,a.cfname fname,a.csname sname,a.tot_amt tot_amt,ai.inv_no
    from advertiser a,advertiser_client ac,adv_invoice ai
    where a.clientnumber = ac.adv_clnt_no and a.advtno = ai.advtno
    and findisname(ai.adissue) = LTRIM(RTRIM(:P298_ISSUES))
    :p298_issues = 'JUL2012' ; -- This exist in other page...
    :p298_issues i TRIED Making it a item with source as database coloumn or even preference item..
    The same query works if i  put the  query as..
    select apex_item.checkbox(1,ai.ino,'CHECKED') " ",ai.advtno,findisname(ai.adissue) issue_name,a.cfname fname,a.csname sname,a.tot_amt tot_amt,ai.inv_no
    from advertiser a,advertiser_client ac,adv_invoice ai
    where a.clientnumber = ac.adv_clnt_no and a.advtno = ai.advtno
    and findisname(ai.adissue) = 'JUL2012' ;
    Why is it not able to find value of text item :p298_issues ...This i have made it as text item currently ..
    actually it is a select list in other page..
    and the database source i have set it to ..database column while ithere is no such column present..i need this to be a parameter
    do i need to use preferences for this ?? Kindly inform and help...
    Edited by: pauljohny on 23-May-2012 23:43

    ..Hello First post was about what i was trying to accomplish..
    Some thing in line of global variables..
    I needed the value of apex item to be accessed in other page.. it was select list..
    There were two ways to accomplish it..One using apex collection or second
    using new change item dynamic action and submitting the item..
    Using these methods i was able to access the .page item in other page.
    Second post i had, was about how I had solved the issue..
    I hat forgotten earlier to close the post.
    Edited by: pauljohny on 28-May-2012 17:55

  • Need help in Interactive Report

    hi,
    i am using a ALV report now i want to make it interactive. as i click on the current page i need to go MIR4 transaction. how can i do it?
    please please help on this issue.

    to make an alv interactive  i did the following steps
    try it by yourself then only u can learn dont copy and paste the code
    step1: declare an iternal table and work area of the type
    data: it_events type standard table of slis_t_alv_events,
            wa_events like line of it_data.
    step2: use the function module
                  reuse_alv_get_events
    and pass the internal table to the fm so that u will get all the events in an internal table . This internal table will have 2 fields like name and form. In the name field u will have all the names of events like
    top_of_page,end_of_page,user_command etc
    so what ever event u want to use modify the internal table according it.For example if u want to use user_command.
    read the internal table it_events into wa_events with key name eq 'USER_COMMAND'.
    after reading the internal table
    move 'f_user_command' to wa_events-form.
    then modify the internal table according to it
    modify it_events from wa_events transporting form.
    after this the internal table will have name = USER_COMMAND and
    form = 'f_user_command'.
    call this form anywhere in the program
    form f_user_command using r_ucomm like sy-ucomm
                                      rs_selfield like slis_selfield.
    case r_ucomm.
    write u r code as appropiate
    WHEN '&IC1'.
    SET parameter ID 'AUN' FIELD rs_selfield-value.( aun is the parameter id for the field for which u r clicking depending on that select the parameter id)
    CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    ENDIF.

  • Need help on classical report

    hi friends i need help on classical reports,
    sold-party,
    material
    sales and distrubitutation channel ,division,
    incoming orders,order number,invoice ,credit,
    i need sub totals and final total of invoice and each customer should display in new page .

    Hi
    Use the Tables KNA1,VBAk,VBAP,VBRK and VBRP and design the report
    see the sample report using KNA1,VBAK and VBAP.
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    Reward points for useful Answers
    Regards
    Anji

  • Passing Interactive report item values to flash chart.

    Hello,
    I am trying to pass an interactive report item value to a 2D column chart type in the chart query as :IR_EMPNO but the item value comes as null and the chart does not show any data. when I am passing this value to another form item and referencing it in the chart query as :P2_EMPNO, it works fine!! have anyone encountered such problem? Please help.
    Regards.

    Thank you Varad...
    Unfortunately, I am still getting no data found. (and there IS data).
    a) Do you mean in the link column section of the report attributes? that is done: item 1 name= IR_P2_FID, value = #FID#
    b) Do you mean my changing my hidden page item to ir_p2_fid with its source value as #FID# ? also done.
    Do I need this hidden item?, and if not how do I refer to link in the where clause of the called page's sql region?
    3) Where Fishery_id = :IR_P2_FID
    Where Fishery_id = &IR_P2_FID
    Thanks again!
    Pamela

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Need help on Oracle Report format

    Hi,
    I need help on Oracle Reports. I am generating a report in excel sheet. I have a column which is 13 digit number (In database it is CHAR datatype). In excel sheet it showing some thing like 9.78381E+12. I want to show complete number like 9783805591331.
    Also sometimes leading zero's are not showing when my column values is something like 0098794859583. I need to show the leading zero's as well in excel without losing them.
    Below are the parameters i am using for the report
    DESFORMAT=SPREADSHEET AND DESTYPE=FILE
    My Oracle 9i developer version.
    Any help on this would be much appreciated.
    Thanks
    Kishore

    An additional quote string ' character with the number field will solve this problem but if u want to display this field in report then it will look ugly
    '''||yourfield from table; check ur regional settings also
    plz mark it helpful correct if it is

  • Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c

    Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c.  I need assistance on connecting these together so I can run a report.  I am not an IT person so if someone could dumb it down it would be great.
    Thanks,
    NBGHealth

    Hello,
    I assume GBS Agency Expert 6.7.6c is some sort of database or data source? If you have an ODBC driver then create or use a System DSN to the database. Then you can create a report using that DSN.
    Otherwise I suggest you contact the makers of GBS Agency Expert 6.7.6c and ask them how to connect to the database.
    Let them know CR is ANSII 92 ODBC 3 compliant.
    Thank you
    Don

  • Interactive Report - One column based on a list of values

    I have an Interactive Report that's part of a Form with Report. The form works fine, but I have a problem with the interactive report. One of the fields is based on a list of values. That is, the data in the table in the State field has numeric state codes, 1 to 51. The form part has no problem with this, as it's a select list based on a list of values LOV query, so the user selects the actual name of the state.
    The interactive report, however, displays the numeric codes, which is what is actually in the table. I am looking in the column definition for some way to tell it to convert the value to the state name, but I do not see it. There is a List of Values place, but that seems to be for filtering purposes instead of for return vs. display value.
    3.2.

    Tharpa,
    I'm not sure if what I am about to suggest will work in 3.2. However, in 4.1, I am using LOVs with IRRs without any issue.
    For example, if I have an address field of state code, I have a named LOV (LOV_STATE). I go into the report attributes for this column. There, I find a section named "List of Values" In here, I pick the "column filter type" of "Use Named List of Values to Filter Exact Match". (Presumably, this will work with Static List too). When the column is displayed, I see the State name displayed.
    -Joe
    Edited by: Joe Upshaw on Mar 14, 2012 1:58 PM

  • Need help with formula that puts values in Field1 based on value of field2

    I have two custom fields in the Contact record - Date met and Time Known. Date met is a standard date field that is entered by the user. I then wanted Time Known to automatically populate with specific values based on a formula I wrote. However, the formula/function is not working properly.
    I'm also not sure if this should be a pre or post field formula, field validation, or workflow. Please help! Here's the formula I have so far. It worked for a new record created, but now doesn't work at all for some reason (probably from my testing).
    IIf(Today()-[<dResearch_Date_ITAG>]<365,"Less than One Year",IIf(Today()-[<dResearch_Date_ITAG>]<1095,"One to Three Years", IIf(Today()-[<dResearch_Date_ITAG>]<1825,"Three to Five Years",IIf(Today()-[<dResearch_Date_ITAG>]<3650,"Five to Ten Years","Ten Plus Years"))))
    This says the following:
    If Date Met is less than 365 from today, then enter "Less than One Year" into the Time Known field;
    if date met is less than 1095 (but greater than 365) days from today, then enter "One to Three Years"
    if date met is less than 1825 (but greater than 1095) days from today, then enter "Three to Five Years"
    if date met is less than 3650 (but greater than 1825) days from today, then enter "Five to Ten Years"
    otherwise, enter "Ten Plus Years" for all values greater than 3650.
    What am I doing wrong? I'm new to expressions and formulas in Oracle.

    Hi, You have to do @ 2 places. For setting the field value @ the time of creating a new record using the field default feature. Check post default as the calculated value is dependent on some other field that you are going to set @ the time of creation. For updating the field whenever the record is modified, use workflows
    -- Venky CRMIT

  • Report parameter value in RTF

    Hi ALL,
    I have a XML report having 3 parameter, i need to capture the value of those parameter in my RTF and based on that i need to do some validation.
    so how to get parameter value in RTF.
    Please help me on this.
    Thanks

    not clear what do you want
    first of all what's your architecture of your report?
    - parameters from ebs?
    - datatemplate?
    - package?
    >
    so how to get parameter value in RTF.
    >
    for datatemplate try
    <parameters>
    <parameter name="P_YOUR_PARAM" dataType = "number" defaultValue="0"></parameter>
    </parameters>
    <dataStructure>
    <element name="ITEM_PARAM"  dataType="varchar2" value="your_package.get_YOUR_PARAM"/>
    </dataStructure>in package "your_package"
    function get_YOUR_PARAM
    return P_YOUR_PARAM;
    end;i need to capture the value of those parameter in my RTF and based on that i need to do some validation.
    >
    validation in package or in rtf template?
    you can get all report parameters by package and use any complex logic for create result xml for template

  • Interactive Reports: Can values for 2nd filter be limited by first filter?

    Hi,
    I have a question for the inbuilt filter tool of interactive reports in apex 4.0.2.00.07. Let's assume my IR data looks like:
    Col1:*Col2*
    A:1
    A:2
    B:3
    If I click on the header of Col1 I will be presented with filter possibilities "A" and "B" and can e.g. set a filter to Col1=A which leaves me with the following view
    Col1:*Col2*
    A:1
    A:2
    Now, if I click on the heading of Col2 to set another filter, I can still select value "3" as well.
    In some cases it would be nice if for any additional filter only those filter values were presented which are still relevant and allow further narrowing of results (like something in the way of LOV cascading). I.e. in our example only "1" and "2", omitting "3". Is there a way to do this?
    Best regards,
    Martin
    Edited by: MBK on Sep 27, 2011 5:35 PM
    Edited by: MBK on Sep 27, 2011 5:37 PM

    Praise goes to Anthony Rayner_ (http://anthonyrayner.blogspot.com/) for a very instructive blog and smooth example applications.
    Anyway, found out what the problem is: Some of my columns are derived from LOVs. In the column 'Report properties > List of Values > Column filter type' my default was 'Use defined list of values to filter exact match', so always all lov entries are available as filters. With e.g. 'Default based on Column type', the application now actually only states values present in the current (potentially pre-filtered) view.
    I guess sometimes it is easy... :-/
    Thanks for the help offered. Nice to see this forum working so smoothly
    BR,
    Martin

  • Interactive report on view based on pipelined table function.

    Hi,
    I want to build an Interactive Report on a view.
    The view definition contains a select on a pipelined table function. I use context functionality to pass paramaters to the pipelined table function.
    A plain select * from #my_view# in SqlPlus results in 121 different rows.
    However, If I base my Interactive report on this view, I get 15 repeated rows (all the same).
    Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working.
    If I use the following approach (http://rakeshjsr.blogspot.nl/2010/10/oracle-apex-interactive-report-based-on.html) I do get results, but I can't use this solution for a reason that's not relevant.

    Hello,
    Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working. I have used it in one instance and it works fine. However I was passing the values to pipe-lined function directly.
    IR Query..
    SELECT * FROM TABLE(fn_pipeline(:P1_ITEM_NAME))Call pipe-lined function from IR query directly (instead of using view)
    Try sending values to Pipe-lined function directly. In-case if the problem is with setting and getting values from the context?
    Regards,
    Hari

  • Need help in dynamic report for a range of year and period

    Dear all,
    I need help in creating an ALV report with dynamic columns based on the Year and period entered on the selection screen. for example if in the year we enter 2002 and period range from 10 to 12 then we should get the 3 columns display for cost(example) for period 10/2002, 11/2002 and 12/2002.
    Can anyone help me in achieving this dynamically since the user can enter the year also in intervals along with the period and data also needs to be populated in the corresponding columns.
    An example code would be of great help.
    Thanks,
    Amit

    Hi,
    Use field symbols as follows.
    TYPE-POOLS : SLIS.
    TABLES : MARC,T001W.
    DATA : BEGIN OF ITAB OCCURS 0,
           MATNR LIKE MARC-MATNR,
           END OF ITAB.
    DATA : FIELDSTAB TYPE LVC_T_FCAT,
           STAB      TYPE LVC_S_FCAT,
           T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           S_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
           NEW_LINE TYPE REF TO DATA,
           NEW_TABLE TYPE REF TO DATA,
           INDEX(3) TYPE C,
           STR(70),
           TEXT(6),
           CNT(1),
           TEXT1(16),
           REPID LIKE SY-REPID.
    FIELD-SYMBOLS : <FS> TYPE STANDARD TABLE,
                    <WA> TYPE ANY.
    SELECT-OPTIONS : S_WERKS FOR MARC-WERKS NO INTERVALS,
                     S_MATNR FOR MARC-MATNR NO INTERVALS.
    INITIALIZATION.
      REPID = SY-REPID.
    START-OF-SELECTION.
      SELECT * FROM MARC
               INTO CORRESPONDING FIELDS OF TABLE ITAB
               WHERE MATNR IN S_MATNR
               AND   WERKS IN S_WERKS.
      SORT ITAB BY MATNR.
      DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR.
      STAB-FIELDNAME = 'MATNR'.
      STAB-DATATYPE  = 'CHAR'.
      STAB-INTLEN    = '18'.
      APPEND STAB TO FIELDSTAB.
      CLEAR CNT.
      LOOP AT S_WERKS.
        CLEAR TEXT.
        CNT = CNT + 1.
        CONCATENATE  'EISLO' CNT INTO TEXT.
        STAB-FIELDNAME = TEXT.
        STAB-DATATYPE  = 'CHAR'.
        STAB-INTLEN    = '16'.
        APPEND STAB TO FIELDSTAB.
        CLEAR S_WERKS.
      ENDLOOP.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = FIELDSTAB
        IMPORTING
          EP_TABLE        = NEW_TABLE.
      ASSIGN NEW_TABLE->* TO <FS>.
      CREATE DATA NEW_LINE LIKE LINE OF <FS>.
      ASSIGN NEW_LINE->* TO <WA>.
      PERFORM MOVE_DATA.
      CLEAR S_FIELDCAT.
      S_FIELDCAT-FIELDNAME = 'MATNR'.
      S_FIELDCAT-TABNAME = ITAB.
      S_FIELDCAT-SELTEXT_M = 'Part Number'.
      S_FIELDCAT-NO_ZERO = 'X'.
      S_FIELDCAT-DDICTXT   = 'M'.
      APPEND S_FIELDCAT TO T_FIELDCAT.
      CLEAR CNT.
      LOOP AT S_WERKS.
        CLEAR T001W.
        CNT = CNT + 1.
        SELECT SINGLE * FROM T001W WHERE WERKS = S_WERKS-LOW AND SPRAS = SY-LANGU.
        CLEAR TEXT.
        CONCATENATE 'EISLO' CNT INTO TEXT.
        S_FIELDCAT-FIELDNAME = TEXT.
        S_FIELDCAT-SELTEXT_M = T001W-NAME2.
    S_FIELDCAT-NO_ZERO = 'X'.
        S_FIELDCAT-DDICTXT   = 'M'.
        APPEND S_FIELDCAT TO T_FIELDCAT.
        CLEAR S_WERKS.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          IT_FIELDCAT = T_FIELDCAT[]
        TABLES
          T_OUTTAB    = <FS>.
    *&      Form  MOVE_DATA
          text
    FORM MOVE_DATA.
      LOOP AT ITAB.
        CLEAR STR.
        CONCATENATE ITAB-MATNR ' ' INTO STR SEPARATED BY SPACE.
        LOOP AT S_WERKS.
          CLEAR MARC.
          SELECT SINGLE * FROM MARC WHERE MATNR = ITAB-MATNR AND WERKS = S_WERKS-LOW.
          IF SY-SUBRC EQ 0.
            CLEAR TEXT1.
            TEXT1 = MARC-EISLO.
            CONCATENATE STR TEXT1 INTO STR SEPARATED BY SPACE.
          ELSE.
            CONCATENATE STR '0' INTO STR SEPARATED BY SPACE.
          ENDIF.
        ENDLOOP.
        <WA> = STR.
        APPEND <WA> TO <FS>.
        CLEAR ITAB.
      ENDLOOP.
    ENDFORM.                    "MOVE_DATA
    Reward points if helpful.
    Regards,
    Sankar..

  • Need help with a report

    hello,
    I'm new to htmldb. I'd like to fetch data from a table. the table contains news.
    here are the colums of the table: id, headline, body, date
    I want all news displayed like this
    headline (bold, different color) <br>
    body (bold) <br>
    date <br>
    Can some please help me. I've used the report template (value attribute pairs) but how can I display the headline in bold and in a different color?
    I hope it's not a stupid question
    thanks in advance
    david
    Message was edited by:
    user463901

    I'm afraid thats not what I need to know. <br>
    I want my report to look like this:<br><br>
    < span class="someclass">headline< /span>< br><br>
    < span class="someclass">body< /span>< br><br>
    < span class="someclass">date< /span>< br><br><br>
    You know, I want that 'span tag' wrapped arround my columns. and a < br> tag after every column.

Maybe you are looking for