Equivalent command in Reports like Sapscripts's PROTECT and ENDPROTECT

Hi,
What is the equivalent command in Reports like Sapscripts's PROTECT and ENDPROTECT?
- Selva

Hi,
I don't think you have any particular command for that in reports. but if you are talking about headers / footers then you may use the events TOP-OF-PAGE and END-OF-PAGE.
Regards,
Anand Mandalika.

Similar Messages

  • Protect and endprotect

    if we wrote code like this what happens
    protect
    protect
    endprotect
    endprotect

    hi,
    SAPscript provides the PROTECT .. ENDPROTECT command pair to allow you to define the areas to be protected against a page break on an individual basis. If you enclose the text to be protected in these commands, then SAPscript will ensure that each line of this text is printed together on the same page.
    If the complete text fits in the space remaining on the current page, then it is output on that page just as it would be if no PROTECT command had been used. If, however, the remaining space is not sufficient for the text, then the PROTECT command has the same effect as a NEW-PAGE command and text is printed on a new page.
    Thus the PROTECT/ENDPROTECT commands may be regarded as a kind of conditional NEW-PAGE command, the condition being whether or not the lines enclosed between the two commands fit in the space remaining in the current main window.
    Syntax:
    /: PROTECT
    /: ENDPROTECT
    The text lines to be protected are enclosed between the two commands.
    u2022 An ENDPROTECT command without a preceding PROTECT command has no effect.
    u2022 If the terminating ENDPROTECT is missing, then it will be assumed at the end of the text.
    u2022 PROTECT .. ENDPROTECT command pairs cannot be nested. If a second PROTECT command occurs before the first one has been terminated by an ENDPROTECT, it will be ignored.
    u2022 If the text enclosed by a PROTECT .. ENDPROTECT pair is itself too long for a single page, then a page break is generated immediately before the text and the text is output in the normal way. It is then unavoidable that a page break will occur at some point within the text.

  • How to use protect and endprotect in smart form

    hi to all experts,
                        im still begineer in smart form , i have two headings like
    company_code:              purchase doc no:
    after this i have a table to be displayed with four columns
    what i want is the whole data should not be split by a page break
    i know this can be achieved by using protect and end protect in sap scripts how to implement in smart form

    probably u have the table inside a loop or a folder or something....
    see this
    Page protection attribute
    Switch for page protection.
    Use
    Page protection switch.
    In some cases you may want to avoid that text is divided by a page break. Therefore, you can protect text sections with a page protection.
    Page protection can extend to
    a paragraph
    a text node
    all output within a folder, for example, several text nodes combined in this folder.
    a line type (table node)
    If on the current page there is not enough space left for the protected text, it is displayed entirely on the next page.
    So u can page protect a line in table...
    in the table node..goto tables tab and click the details tab-->select the line type and check the 'no page break'
    check box

  • Need help regd SCRIPT PROTECT and ENDPROTECT

    hi,
    Actually 3 elements are written in between
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    Command = 'PROTECT'
    and
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    Command = 'ENDPROTECT'
    I am getting the data for which the page is not enough.In this case it is printing 85% of data in the second page and 15% of data in the 3rd page by skipping 1st one eventhough size of 1st page and 2nd page are equal.
    Please suggest me what is happening here .
    thanks
    SAM

    HI,
    You can try out Protect-End protect directly in the form itself by /:.
    If the data is enclosed in this way,
    Protect
    endprotect.
    It is protected for this particular call of the window.
    whereas,
    ENDPROTECT
    PROTECT
    captures the data uptil the next call of the window.
    This first scenario can be useful when you can estimate the amount of data you are printing and the later in random instances such as you want to print the details of flight pertaining to a Carrid to be existing on that page itself, it can be achieved using the second method, where the window is called for every change of carrid.
    Try it out as per your requirement
    Thanks and regards
    Sharath

  • ESC Commands on Reports

    How do I can use ESC commands on Reports, like cutting the page after the report is finished, i'm using AS 10g and a EPSON TM-U220 A, and I need to print receipts

    Yes you can do that. I've done that before with Oracle Reports 2.3.
    We created a file which contains the printer commands and the equivalent codes that the report will use.
    Then you will have to put this codes in the "Printer Code Before/After" properties of your report object ( i.e a frame or a text field).
    Also you have to put specify the filename of this config file in your DESFORMAT system parameter. I think this option is more flexible as you dont have to change your code if ever you change a printer (assuming that printer commands are different). You only have to update the config file.
    You may also use this SRW package :
    SRW.SET_BEFORE_PRINTING_CODE

  • How to use protect and protect

    how to use protect and endprotect for two different element.
    iam using one element for 'tax' and one for 'item total'
    i wnt to print two elements in one page only.

    Hi
    What does 'Elements' mean for u?
    Text Elements?
    You can try to manage it in print program:
    CALL FUNCTION 'CONTROL_FORM'
      EXPORTING
        COMMAND = 'PROTECT'.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        ELEMENT = 'ELEMENT1'.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        ELEMENT = 'ELEMENT2'.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        ELEMENT = 'ELEMENTN'.
    CALL FUNCTION 'CONTROL_FORM'
      EXPORTING
        COMMAND = 'ENDPROTECT'.
    Max

  • How we will have more line of data using protect.. endprotect in main windo

    I have a main window which can have 20 lines and I have paragraph which is of 23  lines, If I use Protect and Endprotect will the data display?(because the protect Endprotect will take whole paragraph in one page but here the paragraph is of 23 lines which cant fit in on window which is of 20 lines)

    Hi
    <u>You have couple of options.</u>
    <b>1) Either you can reduce the font size of the text (To say Courier,  8 Points)
    2) Protect ... Endprotect is for displaying the text inside the block on the same page. Incase the page is geeting ended, then the text printing will not start on that page and will start from the next page to display the whole contents in a page (block).
    3) Increase the page layout from A4 to Letter size if possible.
    View the print preview, to make sure, all the text will come on the desired page as per your requirements.</b>
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Migrating IOS to NX-OS equivalent command snmp-server enable traps config

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;}
    Hello,
    I am trying to figure out what is the equivalent command to configure the IOS "snmp-server enable traps config" on a Nexus 5020 running NX-OS version 4.2.1.N2.1 ,can someone please help me with this problem.
    Also I would like to know if there is a cisco howto document or tool to migrate from IOS to NX-OS  ?
    Any help is greatly appreciated
    Thanks
    Frank

    Hello,
    both Nexus 5k are not generating a trap after a config change, because on both Nexus running same NX-OS version show up the snmp-server enable traps config command. This is really strange behavior, because we are using the same software version for the Nexus 5k devices it doesn't make sense to me. In the meantime I checked the command line guide for this software version but the command wasnt showing up.
    nx5k-mt-2# show snmp trap | grep config
    nx5k-mt-2#
    nx5k-mt-2# show snmp trap
    Trap type                                                              Enabled
    entity               : entity_mib_change                            Yes
    entity               : entity_module_status_change                  Yes
    entity               : entity_power_status_change                   Yes
    entity               : entity_module_inserted                       Yes
    entity               : entity_module_removed                        Yes
    entity               : entity_unrecognised_module                   Yes
    entity               : entity_fan_status_change                     Yes
    link                 : linkDown                                     Yes
    link                 : linkUp                                       Yes
    link                 : extended-linkDown                            Yes
    link                 : extended-linkUp                              Yes
    link                 : cieLinkDown                                  Yes
    link                 : cieLinkUp                                    Yes
    link                 : connUnitPortStatusChange                     Yes
    link                 : fcTrunkIfUpNotify                            Yes
    link                 : fcTrunkIfDownNotify                          Yes
    link                 : delayed-link-state-change                    Yes
    link                 : fcot-inserted                                Yes
    link                 : fcot-removed                                 Yes
    callhome             : event-notify                                 Yes
    callhome             : smtp-send-fail                               Yes
    cfs                  : state-change-notif                           Yes
    cfs                  : merge-failure                                Yes
    fcdomain             : dmNewPrincipalSwitchNotify                   Yes
    fcdomain             : dmDomainIdNotAssignedNotify                  Yes
    fcdomain             : dmFabricChangeNotify                         Yes
    rf                   : redundancy_framework                         Yes
    aaa                  : server-state-change                          Yes
    license              : notify-license-expiry                        Yes
    license              : notify-no-license-for-feature                Yes
    license              : notify-licensefile-missing                   Yes
    license              : notify-license-expiry-warning                Yes
    scsi                 : scsi-disc-complete                           Yes
    fcns                 : reject-reg-req                               Yes
    fcns                 : local-entry-change                           Yes
    fcns                 : db-full                                      Yes
    fcns                 : remote-entry-change                          Yes
    rscn                 : rscnElsRejectReqNotify                       Yes
    rscn                 : rscnIlsRejectReqNotify                       Yes
    rscn                 : rscnElsRxRejectReqNotify                     Yes
    rscn                 : rscnIlsRxRejectReqNotify                     Yes
    fcs                  : request-reject                               Yes
    fcs                  : discovery-complete                           Yes
    fctrace              : route                                        Yes
    zone                 : request-reject1                              Yes
    zone                 : merge-success                                Yes
    zone                 : merge-failure                                Yes
    zone                 : default-zone-behavior-change                 Yes
    zone                 : unsupp-mem                                   Yes
    vsan                 : vsanStatusChange                             Yes
    vsan                 : vsanPortMembershipChange                     Yes
    fspf                 : fspfNbrStateChangeNotify                     Yes
    upgrade              : UpgradeOpNotifyOnCompletion                  Yes
    upgrade              : UpgradeJobStatusNotify                       Yes
    feature-control      : FeatureOpStatusChange                        Yes
    snmp                 : authentication                               Yes
    nx5k-mt-2#
    nx5k-mt-2#

  • How to create a report like this.

    Userid       logintime                                                    logouttime
    367     2008-12-22 08:58:09.000          2008-12-22 10:18:02.000     
    369     2008-12-22 08:52:04.000          2008-12-22 10:18:13.000     
    371     2008-12-22 08:58:27.000          2008-12-22 10:36:24.000     
    374     2008-12-22 08:01:26.000          2008-12-22 10:17:54.000     
    375     2008-12-22 08:56:14.000          2008-12-22 10:18:16.000     
    376     2008-12-22 08:57:38.000          2008-12-22 10:17:57.000     
    463     2008-12-22 12:05:13.000          2008-12-22 13:01:39.000     
    450     2008-12-22 12:01:31.000          2008-12-22 12:14:42.000     
    from this data....i want to find how many people online each hour.
    Time      Login
    8AM         0
    9AM     5
    10AM     5
    11AM     0
    12PM     2
    01PM     0
    02PM     0
    03PM     0
    04PM     0
    05PM     0

    I don't think..both person's solution will work in this case.
    My user table data is like this.
    Userid          logintime                                  logouttime
    367              2008-12-22 08:58:09.000           2008-12-22 10:18:02.000
    369              2008-12-22 08:52:04.000           2008-12-22 10:18:13.000
    371              2008-12-22 08:58:27.000           2008-12-22 10:36:24.000
    374              2008-12-22 08:01:26.000           2008-12-22 10:17:54.000
    375              2008-12-22 08:56:14.000           2008-12-22 10:18:16.000
    376              2008-12-22 08:57:38.000           2008-12-22 10:17:57.000
    463              2008-12-22 12:05:13.000           2008-12-22 13:01:39.000
    450              2008-12-22 12:01:31.000           2008-12-22 12:14:42.000
    from this data....i want to find how many people online each hour using a report.
    Time              Login
    8AM              0
    9AM              5
    10AM            5
    11AM            0
    12PM            2
    01PM            0
    02PM            0
    03PM            0
    04PM            0
    05PM            0
    i think this is not possible using report.
    maybe i need to create a view in db from above table first and out of view should be report data...then just use report to display.
    is there a better and easy solution than above?
    nobody ever tried a report like this?.
    we need group by time function in crstal...each hour, each 30 mins, each 15 mins etc...more time features..

  • How to design report like below

    I Want to make report like this
    * I have Query Q1 (vendor_id, vendor_site_id, invoice_id, ....)
    * base on criteria on Q1 for example : vendor_site_code = vendor merchandise
    I want the output on Q2 (select field A, B,C) ==> I already design on Q_M
    base on invoice_Id (Q1)
    * base on criteria on Q1 for example : vendor_site_code = vendor non merchandise
    I want the output on Q3 (select field D,E,F) different from Q2 => Q_NONM
    base on invoice_id (Q1)
    The problem is while showing the lines I cannot filtering, always show the first on repeating frame
    I design on Report Editor Layout like this for detail / lines
    Fix Frame M1
    Repeating R1 source(Q2) => using format trigger
    Repeating R2 source(Q3) => using format trigger
    but it didn't work, always show R1, R2 cannot show
    How do I make report like that??

    if I use 
    SELECT FORMAT(getdate(),'dd-MMM-yyyy hh:mm:00')
    I'm getting the following error
    'FORMAT' is not a recognized built-in function name.
    Thats because your version is below 2012
    then use the other suggestion which is
    SELECT REPLACE(CONVERT(varchar(12),datefield,106),' ','-') + ' ' + CONVERT(varchar(5),datefield,108) + ':00'
    FROM Table
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Would Like to Get Report of Daily Emails In and Out from Members to a DL Exchange version : 2007 I am the supervisor for the group and want to quantify this information. I do not need to see the content, just quantity is it possible ?

    Would Like to Get Report of Daily Emails In and Out from Members to a DL
    Exchange version : 2007
    I am the supervisor for the group and want to quantify this information. I do not need to see the content, just quantity
    is it possible ?

    Well, distribution groups don't really have a concept of "in" or "out". They only serve to distribute messages sent to them -- unless you're asking to know who was a member of the distribution group at the time a message was sent to the DL.
    Message tracking logs hold the information you want, though. You'd have to look for EXPAND events that reference the distribution group and take the sender's e-mail address from that event. If the DL is a simple one that's not a member of any other groups
    you could also look for RECEIVE events sent to the e-mail address of the group and get the sender's name from that event.
    You can use Powershell extract the rows of data from the logs, but you'll have to write the code to get the data out of those rows and into a format you want. Perhaps LogParser could be useful in place of Powershell?
    --- Rich Matheisen MCSE&I, Exchange MVP

  • Unix command in Report Builder

    Is it possible to use UNIX command in Report builder because I am trying to move one file in UNIX directory to some other directory in UNIX also.
    Thanks
    Shishu Paul
    Chandigarh

    Hye, Basically , I have attached this report in Oracle Apps 11.5.10 and wants to output of this, always having specific output id for each report which have been completed in Apps to be move to some specified folder.
    Please provide some guidance.
    Thanks
    Shishu Paul

  • Is there any command in Reports 6i - which is similar to raise form_trigger

    Is there any command in Reports 6i - which is similar to raise form_trigger_failure in forms6i.

    This might be helpful,
    You must raise the exception from within your PL/SQL.
    SRW.PROGRAM_ABORT examples
    /* Suppose you want to put a border around the salary if it is greater
    than 0.
    ** Suppose, also, that if the report fetches a salary less than 0, you
    want to
    ** raise a customized error message (i.e., "FOUND A NEGATIVE SALARY. .
    ** then terminate the report execution. To do so, you could write the
    ** following format trigger for F_SAL.
    FUNCTION foo return boolean is
    BEGIN
    if :sal >= 0 then
    srw.attr.mask := SRW.BORDERWIDTH_ATTR;
    srw.attr.borderwidth := 1;
    srw.set_attr (0, srw.attr);
    else
    srw.message(100, 'FOUND A NEGATIVE SALARY.
    CHECK THE EMP TABLE.');
    raise srw.program_abort;
    end if;
    RETURN (TRUE);
    END;

  • How can we develop a report like Attendance Register?

    Hi All,
                     I have to develop a report like Attendance register..i.e the first column of the table consisting of standard headings and has to display while intializing it self......and respective columns are dates for a month....once i gave any search criteria the data has fetch from backend and it will give the values with respective each heading in the first column via date wise.
    Please help to resolve this....
    Regards,
    Ravi

    Hi Lekha,
                Thanks for ur reply....My requirement is not like a general report. It was like a attendance report..
              Names           DAY1                                   DAY2                                     DAY3
            Thomus                       
            Robert                           
            Martin                                                                               
    John                               
           Steeve                                                                               
    u2026u2026..               
          u2026u2026..               
    My Table/ALV default display is like above....After any inputs and search ....it has to display correponding values of each day w.r.t each person....
    Plz let me know if u any queries regarding my requirment....
    Regards,
    Ravi

  • How to design Customized ALV report like normal report !

    Hello Friends,
                  I like to design a ALV report, with sub headers, sub totals, summary total and other summary details like percentage sale, which is not relavent to the fields displayed in the ALV.
    I know it is possible to get total of the displayed field, but is it possible to design flexible ALV report like normal report.
    Could U please provide example code, if available.
    Thank you,
    Senthil

    HI,
    Just check this example.
    REPORT  ZLAXMI_ALVEXER2  MESSAGE-ID ZZ                       .
    *& TABLES DECLARATION                                                  *
    TABLES: VBAK.
    *& TYPE POOLS DECLARATION                                              *
    TYPE-POOLS: SLIS.
    *& INTERNAL TABLE DECLARATION                                          *
    DATA: BEGIN OF ITAB OCCURS 0,
           ICON TYPE ICON-ID,
           VBELN LIKE VBAK-VBELN,
           AUDAT LIKE VBAK-AUDAT,
           VBTYP LIKE VBAK-VBTYP,
           AUART LIKE VBAK-AUART,
           AUGRU LIKE VBAK-AUGRU,
           NETWR LIKE VBAK-NETWR,
           WAERK LIKE VBAK-WAERK,
        END OF ITAB.
    *INTERNAL TABLE FOR FIELD CATALOG
    DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
        IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV
               WITH HEADER LINE,
    *INTERNAL TABLE FOR EVENTS
    DATA:    IT_EVENT TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT,
    *INTERNAL TABLE FOR SORTING
          IT_SORT TYPE SLIS_T_SORTINFO_ALV,
          WA_SORT TYPE SLIS_SORTINFO_ALV,
    *INTERNAL TABLE FOR LAYOUT
          WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    *& VARIABLE DECLARATION                                                *
    DATA : V_REPID TYPE SY-REPID,
           V_PAGNO(4) TYPE N,
           V_DATE(8)  TYPE C.
    *& CONSTANTS                                                           *
    CONSTANTS: C_X TYPE C VALUE 'X'.
    *& SELECTION SCREEN                                                    *
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,
                    S_VBTYP FOR VBAK-VBTYP DEFAULT 'C'.
    SELECTION-SCREEN: END OF BLOCK B1.
    SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN  COMMENT 1(20) TEXT-003.
    PARAMETERS: P_LIST RADIOBUTTON GROUP RAD1 DEFAULT 'X'.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) TEXT-004.
    PARAMETERS: P_GRID RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B2.
    AT SELECTION-SCREEN.
      PERFORM VALIDATE_SCREEN.
    *& START OF SELECTION                                               *
    START-OF-SELECTION.
      CLEAR: ITAB, ITAB[].
    V_REPID = SY-REPID.
      PERFORM GET_DATA.
      PERFORM DISPLAY_DATA.
    *& END OF SELECTION                                                    *
    END-OF-SELECTION.
    *--DO ALV Process
      V_REPID = SY-REPID.
    *--Sort the Output Fields
      PERFORM SORT_FIELDS.
    *--Build Field catalog for the Output fields
    PERFORM BUILD_FIELDCAT.
    *--Set the Layout for ALV
      PERFORM SET_LAYOUT.
    *&      Form  GET_DATA
          text
    TO GET THE DATA FROM TABLES INTO ITAB
    FORM GET_DATA .
      SELECT VBELN
             AUDAT
             VBTYP
             AUART
             AUGRU
             NETWR
             WAERK
             INTO CORRESPONDING FIELDS OF TABLE ITAB
             FROM VBAK
             WHERE VBELN IN S_VBELN AND
             AUDAT > '04.04.2005'
             AND NETWR > 0.
      LOOP AT ITAB.
        IF ITAB-NETWR < 10000.
          ITAB-ICON = '@08@'.
        ELSEIF ITAB-NETWR > 10000 AND ITAB-NETWR < 100000.
          ITAB-ICON = '@09@'.
        ELSEIF ITAB-NETWR > 100000.
          ITAB-ICON = '@0A@'.
        ENDIF.
        MODIFY ITAB INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    " GET_DATA
    *&      Form  sort_fields
    FORM SORT_FIELDS .
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'VBTYP'.
      WA_SORT-SPOS = '1'.
      WA_SORT-UP = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'NETWR'.
      WA_SORT-SPOS = '2'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " sort_fields
    *&      Form  build_fieldcat
    *FORM BUILD_FIELDCAT .
    IT_FIELDCAT-COL_POS    = '1'.
    IT_FIELDCAT-FIELDNAME  = 'ICON'.
    IT_FIELDCAT-KEY        = 'X'.
    IT_FIELDCAT-OUTPUTLEN  = '10'.
    IT_FIELDCAT-SELTEXT_L  = 'LIGHT'.
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '2'.
    IT_FIELDCAT-FIELDNAME  = 'VBELN'.
    IT_FIELDCAT-KEY        = 'X'.
    IT_FIELDCAT-OUTPUTLEN  = '10'.
    IT_FIELDCAT-SELTEXT_L  = 'SALES DOC NUMBER'(009).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '3'.
    IT_FIELDCAT-FIELDNAME  = 'AUDAT'.
    IT_FIELDCAT-KEY        = 'X'.
    IT_FIELDCAT-OUTPUTLEN  = '4'.
    IT_FIELDCAT-SELTEXT_L  = 'DOCUMENT DATE'(010).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '4'.
    IT_FIELDCAT-FIELDNAME  = 'VBTYP'.
    IT_FIELDCAT-KEY        = 'X'.
    IT_FIELDCAT-OUTPUTLEN  = '4'.
    IT_FIELDCAT-SELTEXT_L  = 'CATEGORY'(011).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '5'.
    IT_FIELDCAT-FIELDNAME  = 'AUART'.
    IT_FIELDCAT-OUTPUTLEN  = '4'.
    IT_FIELDCAT-SELTEXT_L  = 'DOCUMENT TYPE'(012).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '6'.
    IT_FIELDCAT-FIELDNAME  = 'AUGRU'.
    IT_FIELDCAT-OUTPUTLEN  = '12'.
    IT_FIELDCAT-SELTEXT_L  = 'Order reason'(013).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '7'.
    IT_FIELDCAT-FIELDNAME  = 'NETWR'.
    IT_FIELDCAT-OUTPUTLEN  = '12'.
    IT_FIELDCAT-SELTEXT_L  = 'NET VALUE'(014).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    IT_FIELDCAT-COL_POS    = '8'.
    IT_FIELDCAT-FIELDNAME  = 'WAERK'.
    IT_FIELDCAT-OUTPUTLEN  = '12'.
    IT_FIELDCAT-SELTEXT_L  = 'SD DOC CURR'(015).
    APPEND IT_FIELDCAT.
    CLEAR  IT_FIELDCAT.
    *ENDFORM.                    " build_fieldcat
    *&      Form  set_layout
    FORM SET_LAYOUT .
      IF P_LIST = C_X .
        WA_LAYOUT-WINDOW_TITLEBAR = 'LIST DISPLAY'(016).
        WA_LAYOUT-ZEBRA = 'X'.
    *-- ALV LIST DISPLAY
        PERFORM LIST_DISPLAY TABLES ITAB.
    *-- ALV GRID DISPLAY
      ELSEIF P_GRID = C_X.
        WA_LAYOUT-WINDOW_TITLEBAR = 'GRID DISPLAY'(017).
        WA_LAYOUT-ZEBRA = 'X'.
        PERFORM GRID_DISPLAY TABLES ITAB.
      ENDIF.
    ENDFORM.                    " set_layout
    *&      Form  list_display
    FORM LIST_DISPLAY  TABLES   P_ITAB .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = V_REPID
          IS_LAYOUT          = WA_LAYOUT
          IT_FIELDCAT        = IT_FIELDCAT[]
          IT_SORT            = IT_SORT[]
          I_SAVE             = 'U'
        TABLES
          T_OUTTAB           = ITAB
        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.
    ENDFORM.                    " list_display
    *&      Form  GRID_DISPLAY
    FORM GRID_DISPLAY  TABLES   P_ITAB .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = V_REPID
          IS_LAYOUT          = WA_LAYOUT
          IT_FIELDCAT        = IT_FIELDCAT[]
          IT_SORT            = IT_SORT[]
          IT_EVENTS          = IT_EVENT
        TABLES
          T_OUTTAB           = ITAB
        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.
    ENDFORM.                    " GRID_DISPLAY
    *&      Form  VALIDATE_SCREEN
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE_SCREEN .
      DATA: LV_VBELN LIKE VBAK-VBELN.
      IF NOT S_VBELN IS INITIAL.
        SELECT VBELN
        INTO LV_VBELN
        UP TO 1 ROWS
        FROM VBAK
        WHERE VBELN IN S_VBELN.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MESSAGE E000 WITH 'INVALID SALES DOC'.
        ENDIF.
      ENDIF.
    ENDFORM.                    " VALIDATE_SCREEN
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_DATA .
      DEFINE M_FIELDCAT.
        ADD 1 TO WA_FIELDCAT-COL_POS.
        WA_FIELDCAT-FIELDNAME   = &1.
        WA_FIELDCAT-REF_TABNAME = 'VBAK'.
        WA_FIELDCAT-DO_SUM      = &2.
        WA_FIELDCAT-CFIELDNAME  = &3.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
      END-OF-DEFINITION.
    DATA:
        LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
        LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      M_FIELDCAT 'ICON' ''  ''.
      M_FIELDCAT 'VBELN' ''  ''.
      M_FIELDCAT 'AUDAT' ''  ''.
      M_FIELDCAT 'VBTYP' ''  ''.
      M_FIELDCAT 'AUART' ''  ''.
      M_FIELDCAT 'AUGRU' ''  ''.
      M_FIELDCAT 'NETWR' 'C' 'WAERK'.
      M_FIELDCAT 'WAERK' ''  ''.
    ENDFORM.                    " display_data
    Regards
    Laxmi

Maybe you are looking for

  • Activating TimeMachine Server for Active Directory Users

    Currently we'd like to switch to Active Directory and I tried it out with our Test environment, setuped an Active Directory Server and joined a OSX Mavericks Server. So far so good I can manage all my AD users, but when I click on "Edit Access to Ser

  • Sybase JDBC Connection - OWB11gr2 Issue

    Hi All, We are uning OWB11gr2 on 64-bit linux box. Database is Oracle 11.1.0.6. We are trying to connect to Sybase database is ASA 9.0. Added the JAR files "jconn2.jar" and "jodbc.jar" under OWB_HOME/owb/lib/ext. Restarted Control Centre Agent and OW

  • EIC: Employee search - wild card search with personnel number

    Hi, The employee search functionality in EIC employee-search screen allows to search an employee through wild card search. We had set up this and everything was working fine, but suddenly the functionality to search an employee by giving part of pers

  • Question about  Buttons in swing

    How i can have circular button in GUI program.

  • XML DOM

    Below is a method which reads a specific file and uses xml dom to find some values public void createDBFromXML(File file){        try {             DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();             DocumentBuilder db = db