Where do we write statements?

I am new to XMLP. What is the prerequisite knowledge to build a report in XMLP? I don’t know anything about XML. Do we need XML knowledge? Because when I read user guide or some articles I get confused with the terminology.
I am building Pick and PO reports
1. User wants to move the address3 to one row up, if there is no data in address2 and so on. Basically they don’t want to see the blank space between the address lines and city, state, zip.
I read in user guide (2-72) we can do this checking Null values. But my question is where do we write these statements? Like If …else...statements or xdofo/xdoxslt
2. For the watermark, I read the PDF doc merge. Where do we write this code?
I am getting XML data to build RTF is through the concurrent program setting output format as XML and saving that output as .xml file. Is this right way to do?

Hi,
I think the best thing to do is to have a look at some of Tim Dexters examples and slide shows on the XML Publisher website. Then take a look at his blog. You need to get a good foundation knowledge of the following technologies:
XML
XSL
XSL:FO
MS Word
XPath
http://www.w3schools.com has some excellent tutorials for all of the technologies.
The XMLP (BI) Home page can be found at:
http://www.oracle.com/technology/products/xml-publisher/index.html
Tim Dexter's Blog can be found at:
http://blogs.oracle.com/xmlpublisher
Hope this helps,
Cj

Similar Messages

  • Issue with WRITE statement from Internal Table

    Hi All,
    I have written the below code in a infoset query, the syntax check is ok & when i run the query in debugging mode, i find the internal table being filled with the values & the write statement outputing the values as well.
    But the problem is when i execute the query the output does not show all the lines, instead just displays the last record . What could be the mistake?
    Is it because i have defined Y_EBELN, Y_EBELP & Y_OPENQTY as nodes in the Extras Tab of the infoset & have chosen this for display in my query? How to display the output from my internal table in my query output?
    Hope my problem is clear, await clarification.
    Vivek
    Code
      types:
        Begin of itab,
          wl_ebeln   type eket-ebeln,
          wl_ebelp   type eket-ebelp,
          wl_openqty type eket-menge,
        End of itab.
    Data: il_po type table of itab with header line.
    *Display open PO for materials
      SELECT EKETEBELN EKETEBELP EKETMENGE EKETWEMNG EKET~EINDT
           INTO (Y_EBELN, Y_EBELP, WL_MENGE, WL_WEMNG, Y_EINDT)
        FROM EKET
          INNER JOIN EKPO
             ON EKETEBELN     = EKPOEBELN
              AND EKETEBELP = EKPOEBELP
          INNER JOIN MARD
             ON EKPOMATNR     = MARDMATNR
              AND EKPOWERKS = MARDWERKS
              AND EKPOLGORT = MARDLGORT
        WHERE EKPO~MATNR = MARD-MATNR
          AND EKPO~WERKS = MARD-WERKS
          AND EKPO~LGORT = MARD-LGORT
          AND EKPO~LOEKZ = SPACE
          AND EKPO~ELIKZ = SPACE.
    *Display only still open qty per schedule line
      Y_OPENQTY = WL_MENGE - WL_WEMNG.
      il_po-wl_ebeln = Y_EBELN.
      il_po-wl_ebelp = Y_EBELP.
      il_po-wl_openqty = Y_OPENQTY.
        append il_po.
      ENDSELECT.
    ENDIF.
    Loop at il_po.
      write:/ il_po-wl_ebeln, il_po-wl_ebelp, il_po-wl_openqty.
    endloop.

    Hi Vivek,
      Try it like this.
    Data: Begin of itab,
           lifnr type lfa1-lifnr,
           name1 type lfa1-name1,
           land1 type lfa1-land1,
          End of itab,
          it_lfa1 like table of itab with header line,
          lifnr like lfa1-lifnr,
          name1 like lfa1-name1,
          land1 like lfa1-land1.
    select lifnr name1 land1 into (lifnr, name1, land1)
           from lfa1.
    it_lfa1-lifnr = lifnr.
    it_lfa1-name1 = name1.
    it_lfa1-land1 = land1.
    append it_lfa1.
    endselect.
    loop at it_lfa1.
    write:/ it_lfa1-lifnr, it_lfa1-name1, it_lfa1-land1.
    endloop.
    Note:
    In place of the above select you insert your join select statement. It is working for me.
    You have declared your internal table wrongly. In the internal table instead of TYPE use LIKE, it will work.
    Hope this will work for you.
    Thanks & Regards
    Haritha.

  • Need to use ALV instead of write:/ statement in this perform

    How can I use ALV within this perform instead of using Write:/ in it.
    Scroll the program. At the bottom there is use of write:/ statement.
    How to use ALV in this perform?
    FORM display_logfile .
      TYPES: BEGIN OF lt_openbal,
                bukrs TYPE bukrs,
                hkont TYPE hkont,
                augdt TYPE augdt,
                augbl TYPE augbl,
                zuonr TYPE dzuonr,
                gjahr TYPE gjahr,
                belnr TYPE belnr_d,
                buzei TYPE buzei,
                shkzg TYPE shkzg,
                dmbtr TYPE dmbtr,
             END OF lt_openbal,
             BEGIN OF lt_log2,
                hkont TYPE hkont,
                opbal TYPE dmbtr,
                exp   TYPE dmbtr,
                cap   TYPE dmbtr,
                err   TYPE dmbtr,
             END OF lt_log2,
             BEGIN OF lt_zsct_record,
                kongr TYPE ckml_kongr,
                hkont TYPE hkont,
                zcptp TYPE zdecptp,
                zerrc TYPE zdeerrc,
             END OF lt_zsct_record.
      DATA: lw_zscs_record  TYPE t_zscs_record,
            lw_zsct_record       TYPE lt_zsct_record,
            li_zsct_record         TYPE STANDARD TABLE OF lt_zsct_record,
            li_zsct_record1       TYPE STANDARD TABLE OF lt_zsct_record,
            lw_log1                  TYPE t_zscs_record,
            li_log1                   TYPE STANDARD TABLE OF t_zscs_record,
            li_temp                  TYPE STANDARD TABLE OF t_zsct_autoinv,
            li_openbal              TYPE STANDARD TABLE OF lt_openbal,
            li_openbal_mod      TYPE STANDARD TABLE OF lt_openbal,
            li_log2                   TYPE STANDARD TABLE OF lt_log2,
            li_log2_t                TYPE STANDARD TABLE OF lt_log2,
            lw_log2                 TYPE lt_log2,
            lw_log2_t               TYPE lt_log2,
            lw_openbal_mod    TYPE lt_openbal,
            lw_openbal            TYPE lt_openbal.
      i_zscs_record1 = i_zscs_record.
      DELETE i_zscs_record1 WHERE zerrf NE space.
      SORT i_error_bapi BY recid.
      SORT i_error_bdc BY recid.
      SORT i_suc_bdc BY recid.
      SORT i_suc_bapi BY recid.
      SORT i_zscs_record1 BY recid.
      LOOP AT i_zscs_record1 INTO lw_zscs_record.
        lw_log1-recid = lw_zscs_record-recid.
        lw_log1-kongr = lw_zscs_record-kongr.
        lw_log1-hkont = lw_zscs_record-hkont.
        CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
          EXPORTING
            input  = lw_zscs_record-projk
          IMPORTING
            output = lw_log1-projk.
        lw_log1-werks = lw_zscs_record-werks.
        lw_log1-matnr = lw_zscs_record-matnr.
        lw_log1-zcptp = lw_zscs_record-zcptp.
        lw_log1-zerrf = lw_zscs_record-zerrf.
    To  Check if the KONGR value is is equal to 'E'
        IF lw_zscs_record-kongr = c_e.
          READ TABLE i_error_bapi INTO w_error_bapi WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrc = w_error_bapi-number.
            lw_log1-zertx = w_error_bapi-message.
          ENDIF.
        ELSE.
          READ TABLE i_error_bdc INTO w_error_bdc WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrc = w_error_bdc-number.
            lw_log1-zertx = w_error_bdc-message.
          ENDIF.
        ENDIF.
    *****To Check if the KONGR value is is equal to 'E'
        IF lw_zscs_record-kongr = c_e.
          READ TABLE i_suc_bapi INTO w_suc_bapi WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrf = c_x.
    *******To check if  lw_log1-zertx = w_error_bapi-message.
          ENDIF.
        ELSE.
          READ TABLE i_suc_bdc INTO w_suc_bdc WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrf = c_x.
    ********To check if lw_log1-zertx = w_error_bdc-message.
          ENDIF.
        ENDIF.
        APPEND lw_log1 TO li_log1.
    *To clear work areas
        CLEAR: lw_log1,
               w_error_bapi,
               w_suc_bdc,
               w_suc_bapi,
               w_error_bdc,
               lw_zscs_record.
      ENDLOOP.
      IF NOT i_zscs_record1 IS INITIAL.
    *To retrieve required data from the custom table ZSCT_AUTOINV
        SELECT saknr
               fipos
               geber
               saknr_off
               fipos_off
          FROM zsct_autoinv
          INTO TABLE i_autoinv
           FOR ALL ENTRIES IN i_zscs_record1
           WHERE saknr = i_zscs_record1-hkont.
        IF sy-subrc = 0.
          SORT i_autoinv.
        ENDIF.
      ENDIF.
    Assigning I_AUTOINV data into a local internal table for further processing
      li_temp[] = i_autoinv[ ].
    Sort LI_TEMP by SAKNR
      SORT li_temp BY saknr.
    Delete adjacent duplicates from LI_TEMP comparing SAKNR
      DELETE ADJACENT DUPLICATES FROM li_temp COMPARING saknr.
    Check if LI_TEMP is initial
      IF NOT li_temp[] IS INITIAL.
    Retrieve required data from table BSIS for all the G/L accounts
        SELECT  bukrs
                hkont
                augdt
                augbl
                zuonr
                gjahr
                belnr
                buzei
                shkzg
                dmbtr
           FROM bsis
           INTO TABLE li_openbal_mod
           FOR ALL ENTRIES IN li_temp
         WHERE  bukrs = c_wfp
           AND  hkont = li_temp-saknr.
        IF sy-subrc = 0.
        ENDIF.
      ENDIF.
      SORT li_openbal_mod BY hkont.
    ****Retrieve data from table ZSCT_RECORD for further processing for
    ****all entries where ZERRF is equal to space
      IF p_prsall = c_x.
        SELECT kongr
               hkont
               zcptp
               zerrc
          FROM zsct_record                                  "#EC CI_NOFIRST
          INTO TABLE li_zsct_record
          WHERE zerrf = space.
        IF sy-subrc = 0.
    *****Delete records from LI_ZSCT_RECORD where HKONT value is equal to space
          DELETE li_zsct_record WHERE hkont EQ space.
        ENDIF.
      ELSEIF p_cstcpt = c_x.
        SELECT kongr
               hkont
               zcptp
               zerrc
          FROM zsct_record                                  "#EC CI_NOFIRST
          INTO TABLE li_zsct_record
         WHERE zerrf = space
         AND   kongr NE c_e.
        IF sy-subrc = 0.
    ******Delete records from LI_ZSCT_RECORD where HKONT value is equal to space
          DELETE li_zsct_record WHERE hkont EQ space.
        ENDIF.
      ELSEIF p_cstexp = c_x.
        SELECT kongr
               hkont
               zcptp
               zerrc
         FROM  zsct_record                                  "#EC CI_NOFIRST
         INTO TABLE li_zsct_record
         WHERE zerrf = space
         AND   kongr EQ c_e.
        IF sy-subrc = 0.
    ******Delete records from LI_ZSCT_RECORD where HKONT value is equal to space
          DELETE li_zsct_record WHERE hkont EQ space.
        ENDIF.
      ENDIF.
      LOOP AT li_openbal_mod INTO lw_openbal.
        IF lw_openbal-shkzg = c_shkzg1.
          v_todmbtr = v_todmbtr + lw_openbal-dmbtr.
        ELSEIF lw_openbal-shkzg = c_shkzg2.
          v_todmbtr = v_todmbtr - lw_openbal-dmbtr.
        ENDIF.
        AT END OF hkont.
          lw_log2-hkont = lw_openbal-hkont.           "GL account
          lw_log2-opbal = ABS( v_todmbtr ).      "Open item balance
          APPEND lw_log2 TO li_log2.
    *log record appended with GL Account and account open item balance
          CLEAR: v_todmbtr,
                 lw_openbal.
        ENDAT .
      ENDLOOP.
      SORT li_log2 BY hkont.
      LOOP AT li_log2 INTO lw_log2.
        CLEAR v_totexppe.
        CLEAR v_totcapit.
        CLEAR v_toterror.
    *Cost portion to be capitalised calculated
        LOOP AT li_zsct_record INTO lw_zsct_record
                 WHERE hkont = lw_log2-hkont AND
                  kongr NE c_e AND zerrc IS INITIAL.
          v_totcapit = v_totcapit + lw_zsct_record-zcptp.  "CC calculated
        ENDLOOP.
    *Expensed cost portion calculated
        LOOP AT li_zsct_record INTO lw_zsct_record WHERE
                hkont = lw_log2-hkont        AND
                kongr = c_e AND zerrc IS INITIAL .
          v_totexppe = v_totexppe + lw_zsct_record-zcptp.  "ECP calculated
        ENDLOOP.
    *Errors calculated
        LOOP AT li_zsct_record INTO lw_zsct_record WHERE
                hkont = lw_log2-hkont AND
                zerrc IS NOT INITIAL .
          v_toterror = v_toterror + lw_zsct_record-zcptp.  "Errors calculated
        ENDLOOP.
        lw_log2-exp = v_totexppe.           "Expensed cost portion
        lw_log2-cap = v_totcapit.           "Cost capitalised
        lw_log2-err = v_toterror.           "Errors
    *Cost portion capitalised expensed and errors in calculation are
    *trans ported for related GL accont
        MODIFY li_log2 FROM lw_log2
        TRANSPORTING exp cap err.
      ENDLOOP.
      LOOP AT li_log2_t INTO lw_log2_t.
        MODIFY li_log2 FROM lw_log2_t TRANSPORTING opbal WHERE hkont = lw_log2_t-hkont.
        CLEAR : lw_log2_t.
      ENDLOOP.
      WRITE:/1(15) text-018,sy-datum.             "SESSION DATE:
      SKIP 2.
    For printing the hear level of the output log
      WRITE:/1(16)   text-003,                     "Record ID number
             20(11)  text-004,                     "Reason Code
             34(10)  text-005,                     "GL Account
             47(12)  text-006,                     "Project Code
             62(5)   text-007,                     "Plant
             70(9)   text-008,                     "Commodity
             82(25)  text-009,                     "Cost portion To be posted
             110(12) text-010,                     "Success Flag
             125(10) text-011,                     "Error Code
             138(50) text-012.                     "Error TXT
      SKIP.
      LOOP AT li_log1 INTO lw_log1.
        WRITE:/1(16)   lw_log1-recid,
               20(11)  lw_log1-kongr,
               34(10)  lw_log1-hkont,
               47(12)  lw_log1-projk,
               62(5)   lw_log1-werks,
               70(9)   lw_log1-matnr,
               82(25)  lw_log1-zcptp,                       "#EC UOM_IN_MES
               110(12) lw_log1-zerrf,
               125(10) lw_log1-zerrc,
               138(80) lw_log1-zertx.
        CLEAR:lw_log1.
      ENDLOOP.
      SKIP 2.
      IF NOT li_log2 IS INITIAL.
        ULINE.
        WRITE:/1(16)  text-013,                  "GL ACCOUNT CODE
               20(17) text-014,                  "OPEN ITEM BALANCE
               40(21) text-015,                  "EXPENSED COST PORTION
               64(24) text-016,                  "CAPITALIZED COST PORTION
               92(20) text-017.                  "ERRORS.
        LOOP AT li_log2 INTO lw_log2.
          WRITE:/1(16)   lw_log2-hkont,
                 20(17)  lw_log2-opbal,                
                 40(21)  lw_log2-exp,                      
                 64(24)  lw_log2-cap,                     
                 92(20)  lw_log2-err.                     
          CLEAR:lw_log2.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " DISPLAY_LOGFILE

    hi,
    You need to use FM 'REUSE_ALV_LIST_DISPLAY' for this purpose. For using this FM, you need to create a field catlog which will contain all information about the coloumns you want to display for example their position, their text etc.
    Below there is a small demo for achiving this.
    TYPE-POOLS:slis.
    DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
    TYPES: BEGIN OF ty_itab1,
           vbeln LIKE vbap-vbeln,
           posnr LIKE vbap-posnr,
           werks LIKE vbap-werks,
           lgort LIKE vbap-lgort,
           END OF ty_itab1.
    DATA: itab1 TYPE TABLE OF ty_itab1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.
    SELECTION-SCREEN END OF  BLOCK b1.
    START-OF-SELECTION.
      PERFORM select_data.
    END-OF-SELECTION.
    PERFORM display.
    FORM select_data .
      SELECT vbeln
         posnr
         werks
         lgort
         INTO CORRESPONDING  FIELDS OF TABLE itab1
         FROM vbap
         WHERE  vbeln IN s_vbeln.
      IF sy-subrc <> 0.
        MESSAGE 'Enter The Valid Sales Document Number'(t04) TYPE 'I'.
        EXIT.
      ENDIF.
    ENDFORM.
      IF alv_list = 'X'.
        PERFORM build_fieldcat TABLES i_fieldcat[]
                               USING :
    *-Output-field Table      Len  Ref fld Ref tab Heading    Col_pos
       'VBELN'       'ITAB1'     10   'VBAP'  'VBELN'    ''            1,
       'POSNR'       'ITAB1'     6    'VBAP'  'POSNR'    ''            2,
       'WERKS'       'ITAB1'     4    'VBAP'  'WERKS'    ''            3,
       'LGORT'       'ITAB1'     4    'VBAP'  'LGORT'    ''            4.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program       = sy-repid
           i_callback_pf_status_set = c_pf_status
            i_callback_user_command  = 'USER_COMMAND '
           it_events                = t_alv_events[]
            it_fieldcat              = i_fieldcat[]
          TABLES
            t_outtab                 = itab1[]
          EXCEPTIONS
            program_error            = 1
            OTHERS                   = 2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    FORM build_fieldcat TABLES  fpt_fieldcat TYPE slis_t_fieldcat_alv
                        USING   fp_field     TYPE slis_fieldname
                                fp_table     TYPE slis_tabname
                                fp_length    TYPE dd03p-outputlen
                                fp_ref_tab   TYPE dd03p-tabname
                                fp_ref_fld   TYPE dd03p-fieldname
                                fp_seltext   TYPE dd03p-scrtext_l
                                fp_col_pos   TYPE sy-cucol.
    *-- Local data declaration
      DATA:   wl_fieldcat TYPE slis_fieldcat_alv.
    *-- Clear WorkArea
      wl_fieldcat-fieldname       = fp_field.
      wl_fieldcat-tabname         = fp_table.
      wl_fieldcat-outputlen       = fp_length.
      wl_fieldcat-ref_tabname     = fp_ref_tab.
      wl_fieldcat-ref_fieldname   = fp_ref_fld.
      wl_fieldcat-seltext_l       = fp_seltext.
      wl_fieldcat-col_pos         = fp_col_pos.
    *-- Update Field Catalog Table
      APPEND wl_fieldcat  TO  fpt_fieldcat.
    ENDFORM.

  • ABAP "WRITE" Statements for Debugging

    Just curious to know if one can use ABAP write statements in Update Rules for debugging and auditing, and where the results are actually written to, and if they're accessible via the AWB.
    Thank you.

    Jerry you can write to the monitor from within the update rules.
    The debug message you were going to write out instead go ahead and append your message to the monitor structure.
    FORM compute_data_field
    TABLES   <b>MONITOR</b> STRUCTURE RSMONITOR  
    USING    COMM_STRUCTURE LIKE /BIC/CS8ZTESTODS
             RECORD_NO LIKE SY-TABIX
             RECORD_ALL LIKE SY-TABIX
             SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
    CHANGING RESULT LIKE /BIC/VZTESTCUBT-INVCD_QTY
             RETURNCODE LIKE SY-SUBRC
             ABORT LIKE SY-SUBRC.
    You will then be able to view any messages you have added to the monitor in the monitor.
    Hope this helps.
    Cheers

  • Write statement after ALV

    Hello,
    I have a requirement where I am displaying the ALV using grid.
    Have a button on top.
    After ALV display, I select the row and press the button.
    The processing takes place like (Delivery creation).
    After this delivery creation, I have to display the log output.
    But the log has to be using the normal Write Statement.
    Like : Write: 'Delivery created : 1001;.
    I am trying this but my write is not working.
    The code isgetting executed when seen in debug but nothing displayed on screen.
    Any idea??
    Pranu

    Hi,
    add the  below command in the ALV exporting..
    ...  user_command   = 'USER_COMMAND'..
    and paste the code at the last ..
    FORM user_command USING r_ucomm     TYPE sy-ucomm
                            ls_selfield TYPE slis_selfield.
    IF sy-ucomm = 'YOur button'.
       LEAVE TO SCREEN 0.
    endif.
    ENDFORM.                    "USER_COMMAND
    Regards,
    Prabhudas

  • Write statement - currency

    Subject changed by moderator to something more meaningful.  Please take care in future
    Hi,
             I want to write the currency using the write statement.. but i am getting the error for the same:
    "Use addition CURRENCY when outputting LW_AMOUNT
    Use auxiliary field when outputting with MESSAGE"
    my statement is :
    write : lw_amount.
    where lw_amount is type curr having a reference key attached to it..
    kindly help me..
    Edited by: Matt on Dec 22, 2008 11:01 AM

    >
    neha gupta wrote:
    > Hi,
    >          I want to write the currency using the write statement.. but i am getting the error for the same:
    >
    > "Use addition CURRENCY when outputting LW_AMOUNT
    > Use auxiliary field when outputting with MESSAGE"
    >
    > my statement is :
    > write : lw_amount.
    >
    > where lw_amount is type curr having a reference key attached to it..
    >
    > kindly help me..
    Ur question itself has the answer, marked by me in red.
    A simple F1 on write statement wud have given u the solution.
    Sap has provided really intensive documantation with examples so try to make use of it.
    use as write: lw_amount currency <ur currency key>.
    кu03B1ятu03B9к
    Edited by: kartik tarla on Dec 22, 2008 3:26 PM

  • Properly displaying currency amounts (negative sign) via WRITE statement

    Dear forumers,
    Using the WRITE statement, how may I properly display a currency amount that has a negative value?
    In my program, the variable, V_AMOUNT to be displayed is originally of the type "WERTV12".
    Using the WRITE statement for this, nothing gets displayed in the screen (blank only).
    So, I assigned V_AMOUNT to another variable of the type "P DECIMALS 2", V_AMT.
    Using the WRITE statement for this, the amount is displayed in the screen.
    But, if the amount has a negative value, the negative sign is not displayed there.
    I.e. If V_AMT has the value '500.00-', only '500.00' is displayed in the screen.
    Finally, I changed the type of V_AMT as type string.
    This works - any amounts with negative sign is displayed in the screen properly.
    But, with this approach, I'm unable to "customize" the display of amounts according to currency, like this:-
    DATA int TYPE i VALUE 12345678.
    WRITE int CURRENCY 'EUR'.
    The output of the WRITE statement is "123456,78".
    Is there a better way to achieve this?

    SAP display amounts/quantities as positive numbers with another field that denotes whether positive or negative.  You could change the value to a character field and put the negative where you need it (or put an additional field next to the amount with the sign)... but using a character field probably would negate the currency display, too....

  • How to use Write statement along with ALV output

    Hi expert,
    currently i have a requirement where i am first displaying message with write statement and after that ALV should be displayed ...something like below:
    vendor number is wrong.
    material number is wrong.
    plant is wrong.
    and then here ALV output -list of records updated in the database.
    but as of now the ALV is shown first and when going back then the write message information is dispayed.
    can anyone help how we can get this in only one screen?
    Thanks!!!
    Rajesh

    May below example give you some idea.
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_kna1 OCCURS 0,
            kunnr TYPE kna1-kunnr,
            name1 TYPE kna1-name1,
            ort01 TYPE kna1-ort01,
          END OF it_kna1.
    DATA: it_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    START-OF-SELECTION.
      SELECT kunnr name1 ort01
        FROM kna1 INTO TABLE it_kna1 UP TO 10 ROWS.
    END-OF-SELECTION.
      WRITE:/ 'Write Statement Display' HOTSPOT ON.
    AT LINE-SELECTION.
      CLEAR it_fcat.
      it_fcat-fieldname = 'KUNNR'.
      it_fcat-tabname = 'IT_KNA1'.
      it_fcat-seltext_l = 'Customer'.
      APPEND it_fcat.
      CLEAR it_fcat.
      it_fcat-fieldname = 'NAME1'.
      it_fcat-tabname = 'IT_KNA1'.
      it_fcat-seltext_l = 'Customer Name'.
      APPEND it_fcat.
      CLEAR it_fcat.
      it_fcat-fieldname = 'ORT01'.
      it_fcat-tabname = 'IT_KNA1'.
      it_fcat-seltext_l = 'City'.
      APPEND it_fcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          it_fieldcat        = it_fcat[]
        TABLES
          t_outtab           = it_kna1[].

  • REUSE_ALV_GRID_DISPLAY / i_callback_user_command  / write statements

    Hi,
    i would like to output some log within the form defined by i_callback_user_command . Therefor i used some simple write statements, i expected the output after going back. But - nothing is shown. Where it is going?
    FORM alv_user_command
      USING ucomm               TYPE syucomm
            selfield            TYPE slis_selfield.                          "#EC_CALLED
      FIELD-SYMBOLS:
        <p>                     type t_out.
      IF ucomm = '&DATA_SAVE'.
        loop at it_out ASSIGNING <p_out> where sel = 'X'.
          write:/ <p_out>-region, <p_out>-area.
        endloop.
        selfield-refresh    = 'X'.
        selfield-row_stable = 'X'.
        selfield-col_stable = 'X'.
      ENDIF.
    ENDFORM.                    "alv_user_command

    Hi,
    try like this..
    FORM alv_user_command
      USING ucomm               TYPE syucomm
            selfield            TYPE slis_selfield.                          "#EC_CALLED
      FIELD-SYMBOLS:
        <p>                     type t_out.
      CHECK NOT selfield-value IS INITIAL.  "Add this Line
      IF ucomm = '&DATA_SAVE'.
        loop at it_out ASSIGNING <p_out> where sel = 'X'.
          write:/ <p_out>-region, <p_out>-area.
        endloop.
        selfield-refresh    = 'X'.
        selfield-row_stable = 'X'.
        selfield-col_stable = 'X'.
      ENDIF.
    ENDFORM. 
    Regards,
    Prabhudas

  • What is the condition for First write statement in reports?

    What is the condition for First write statement in reports?

    In
    TOP-OF-PAGE & START-OF-SELECTION.
    U have to write what ever u want to dispaly.
    Top-of-page will trigger first and write the statements.
    SAmple report program for reference.
    REPORT ztemplate
              NO STANDARD PAGE HEADING
              LINE-SIZE 130
              LINE-COUNT 65
              MESSAGE-ID zm.
    * The Data Declarations
    TABLES:    mara." General Material Data.
    * Type Declarations:
    TYPES : BEGIN OF ty_mara,
              cb(1),
              matnr LIKE mara-matnr,
              mtart LIKE mara-mtart,
              matkl LIKE mara-matkl,
             END OF ty_mara.
    * Internal Tables:
    * The following structure type must be defined in the data dictionary
    DATA :  i_output TYPE ty_mara OCCURS 0 WITH HEADER LINE.
    DATA: lines TYPE i, free TYPE i.
    * The Selection Screen Definition
    SELECTION-SCREEN BEGIN OF BLOCK b_main WITH FRAME TITLE text-b01.
    *SELECTION-SCREEN skip.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr.                  "Material No
    *PARAMETERS:     P_XXXXX like XXXX-XXXXX.                   "Description
    *PARAMETERS:     CB_XXXX as checkbox.                       "Description
    *PARAMETERS:     RB_XXXY radiobutton group XXX default 'X'. "Description
    *PARAMETERS:     RB_XXXZ radiobutton group XXX.             "Description
    *SELECTION-SCREEN COMMENT fmt name.
    SELECTION-SCREEN END OF BLOCK b_main.
    *SELECTION-SCREEN ULINE.
    *eject
    * INITIALIZATION
    INITIALIZATION.
    * AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
    *Validate material no details
    IF NOT s_matnr[] IS INITIAL.
    LOOP AT s_matnr.
    IF NOT s_matnr-low  IS INITIAL.
      SELECT SINGLE matnr INTO v_matnr
             FROM mara
             WHERE matnr = s_matnr-low.
      IF sy-subrc NE 0.
        MESSAGE i128.
        LEAVE LIST-PROCESSING.
      ENDIF.
      ENDIF.
    IF NOT s_matnr-high IS INITIAL.
      SELECT SINGLE matnr INTO v_matnr
             FROM mara
             WHERE matnr = s_matnr-high.
      IF sy-subrc NE 0.
        MESSAGE i128.
        LEAVE LIST-PROCESSING.
      ENDIF.
      ENDIF.
    ENDLOOP.
    ENDIF.
    * START-OF-SELECTION
    START-OF-SELECTION.
       REFRESH: i_output.
      CLEAR  : i_output.
      SELECT matnr
             mtart
             matkl
             INTO TABLE i_output
             FROM mara
             WHERE mara~matnr IN s_matnr.
      IF sy-subrc NE 0.
        MESSAGE i000 WITH text-002.
        " No records found for selected criteria
            leave list-processing.
      ENDIF.
      IF NOT i_output[] IS INITIAL.
        LOOP AT i_output INTO wa_output.
          WRITE:/001 wa_output-cb AS checkbox,
                 003 wa_output-matnr,
                 015 wa_output-mtart,
                 024 wa_output-matkl.
          CLEAR wa_output.
        ENDLOOP.
      ENDIF.
    * END-OF-SELECTION
    END-OF-SELECTION.
      lines = sy-linno - 1.
    SET PF-STATUS 'ZSTATUS'.
    AT USER-COMMAND.
          wa_output-cb = space.
          SET PF-STATUS 'ZSTATUS' EXCLUDING 'SAVE'.
          DO lines TIMES.
            READ LINE sy-index FIELD VALUE wa_output-cb.
              IF wa_output-cb = 'X'.
            MODIFY i_output  FROM wa_output INDEX sy-tabix TRANSPORTING cb.
            ENDIF.
          ENDDO.
    CASE sy-ucomm.
    WHEN 'SAVE'.
          DELETE i_output WHERE cb = 'X'.
    WHEN 'BACK'.
    LEAVE SCREEN.
    ENDCASE.
    * TOP-OF-PAGE.
    TOP-OF-PAGE.
      ULINE.
      FORMAT INTENSIFIED OFF.
      FORMAT COLOR COL_HEADING.
      WRITE:/001 'CB' ,
             003 'Material No',
             015 'Mat type',
             024 'Mat group'.
      FORMAT COLOR OFF.
      FORMAT INTENSIFIED ON.
      ULINE.

  • WRITE statement column position as variable

    hello everybody,
    kindly help me how to do this:
    Vendor          2004    2005    2006
    xxxxxxx         xxx.xx  xxx.xx  xxx.xx
    the year is select-option. the number of year depends on the on year range entered by the user.
    how could i write this using the WRITE STATEMENT since the column year depends on the range entered by the user. if the user entered 2004-2007 meaning i have 4 year in the title of the report.
    how could i write that the position of the column is VARIABLE.
    thanks.
    den

    Hi donna,
    1. Simple.
    2. we have to use
       <b>WRITE : at</b> pos year
      where pos = position variable
            year  = year data.
    3. just copy paste in new program
    4.
    report abc.
    data : pos type i.
    data : yr(4) type n.
    yr = '2003'.
    do 5 times.
      pos = pos + 6.
      yr = yr + 1.
      write : at pos  yr.
    enddo.
    regards,
    amit m.

  • Write stat below alv report .if i use field  catalog.

    hi experts,
    i want to use write statment  after alv report.
    note: i am useing fieldcatalog.
    i got it if i use standard table with : end_of_list event event.
    thank you.

    Hi snk,
    1. It won't work in GRID display.
    2. The reason is when grid comes,
       it comes on a screen which has container and the grid control.
    3. Write statement is displayed on a special screen,
       which is generally used for list output.
       Normal screens (where we can put textboxes/checkboxes etc),
       do not support write statements.
    regards,
    amit m.

  • WRITE STATEMENT IS GETTING EXECUTED BUT NOT GETTING DISPLAYED

    HII All,
    i hv created a selection screen with push button. Now when i m clicking that pushbutton, output is not getting displayed..when i debug program ,control enters in switch case and also executes write statement but write statement is not getting displayed.. below is the code ..
    SELECTION-SCREEN BEGIN OF BLOCK INPUT WITH FRAME TITLE TEXT-001.
      SELECTION-SCREEN PUSHBUTTON 10(20) TEXT-002  USER-COMMAND FIR.
      SELECTION-SCREEN PUSHBUTTON 35(20) TEXT-003  USER-COMMAND SECOND.
    SELECTION-SCREEN END OF BLOCK INPUT.
           WA-EMP_NO = 123.      
            WA-EMP_CO = 'A'.
            WA-EMP_N = 'APOORV'.
            APPEND WA TO IT_TAB.
    AT SELECTION-SCREEN.
    CASE SY-UCOMM.
    WHEN 'FIR'.
    PERFORM SUB1.
    WHEN 'SECOND'.
            APPEND LINES OF IT_TAB FROM 2 TO 3 TO IT_TAB1.
            WRITE:/ 'SECOND INTERNAL TABLE CONTENTS'.
            LOOP AT IT_TAB1 INTO WA1.
            WRITE:/15 SY-TABIX, WA1-EMP_NO NO-ZERO, WA1-EMP_CO, WA1-EMP_N.
            ENDLOOP.
    ENDCASE.
    FORM SUB1.
    LOOP AT IT_TAB INTO WA.
              WRITE:/ SY-TABIX, WA-EMP_NO NO-ZERO, WA-EMP_CO, WA-EMP_N.
    ENDLOOP.
    ENDFORM.
    Plz help me..
    Edited by: Julius Bussche on Jan 29, 2009 1:40 PM
    Code tags added and please dont use Caps-Lock.

    HI,
    SELECTION-SCREEN BEGIN OF BLOCK INPUT WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN PUSHBUTTON 10(20) TEXT-002 USER-COMMAND FIR.
    SELECTION-SCREEN PUSHBUTTON 35(20) TEXT-003 USER-COMMAND SECOND.
    SELECTION-SCREEN END OF BLOCK INPUT.
    WA-EMP_NO = 123.
    WA-EMP_CO = 'A'.
    WA-EMP_N = 'APOORV'.
    APPEND WA TO IT_TAB.
    * AT SELECTION-SCREEN.                 "Comment this
    START-OF_SELECTION.                     " Add this
    CASE SY-UCOMM.
    WHEN 'FIR'.
    PERFORM SUB1.
    WHEN 'SECOND'.
    APPEND LINES OF IT_TAB FROM 2 TO 3 TO IT_TAB1.
    WRITE:/ 'SECOND INTERNAL TABLE CONTENTS'.
    LOOP AT IT_TAB1 INTO WA1.
    WRITE:/15 SY-TABIX, WA1-EMP_NO NO-ZERO, WA1-EMP_CO, WA1-EMP_N.
    ENDLOOP.
    ENDCASE.
    FORM SUB1.
    LOOP AT IT_TAB INTO WA.
    WRITE:/ SY-TABIX, WA-EMP_NO NO-ZERO, WA-EMP_CO, WA-EMP_N.
    ENDLOOP.
    ENDFORM.

  • Write Statements are not getting Displayed

    Hi All,
    We are going for Upgrade from 4.7 to ECC. So, in my program we have few write statements which are not getting displayed in the output. Those write statments are seen as errors in the extended check as Char. strings w/o text elements will not be translated: 'Income Tax Worksheet'.
    Could any one please help me to over come this errors and Display the wite statements.
    Thanks
    Shashikanth

    Have you mapped the checked and unchecked glyphs to be used?
    Check the doc and blog for check boxes.
    Regards
    tim

  • Double click on output in write statement

    hi,
    i have a list of PO as outout thru write statement(classical).i wamt to open me23n with the double click on that particular po.
    how could i do this? answer with full code.

    Hello
    After capture the number of the PO do the following
                SET PARAMETER ID 'BES' FIELD <n° of the PO>
                CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    Hope it helps
    Kleber Santos

Maybe you are looking for

  • Problem with Oracle 11g(32 bit) installation on windows 7 ultimate edition

    Hello all, I have a problem with Oracle 11g(32 bit) installation on windows 7 ultimate edition (32 bit). I have successfully installed it immediately after OS installation. But today, i have decided to deinstall it and go for Oracle 10g version for 3

  • Installer says OS is older than it actually is

    Hello, "Installer" is stating an application I'm trying to install cannot be installed on my computer, because the operating system I'm using is too old.  It says I need 10.7 or newer, but I'm running 10.9.5.  The programs I'm trying to install are p

  • Query with rownum

    Here's a tricky one that has stumped me. I have two queries below : The first query should list me records ordered by apxl_log_id field desc(first 50). The second query should list me records ordered by apxl_log_id field desc(first 100). The only dif

  • I need the function module name

    i got the requirement to post data to FBS1 FB01 FBV1 transaction before posting the data to transaction i need to check the data in the iternal table for validity . this can be hadled by function modules or bapi if any now the name please reply

  • MIRO CST calculating doubled

    Dear all,                     MIRO transactions CST condition calculating doubled, IN po i have maintained 2% cst, Say Example Price 100, Cst 2%= 2 Rs Here cst amount it wont add to the material cost. This is project based industry so this cst amount