How to use AT LINE-SELECTION and AT USER-COMMAND in one report????

Dear all,
I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
How can I use both of them in one report for your reference I am giving my test program below.
REPORT ZTEST111 .
SET PF-STATUS '100'.
DO 10 TIMES.
WRITE:/ SY-INDEX.
HIDE SY-INDEX.
ENDDO.
START-OF-SELECTION.
AT LINE-SELECTION.
MESSAGE I002(SY) WITH SY-INDEX.
AT USER-COMMAND.
MESSAGE I002(SY) WITH 'USER COMMAND'.
END-OF-SELECTION.
Thanks in advance
Sachin Gautam

hi
Syntax
AT USER-COMMAND.
Effect
This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
Note
Self-defined function codes are all those that include character combinations, except for the following:
The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
Table 1
Function code Function
%CTX Call a context menu
%EX Exit
%PC Save to file
%PRI Print
%SC Search for ...
%SC+ Find next
%SL Search in office
%ST Save to report tree
Table 2
Function code Function
BACK Back
P- Scroll to previous page
P-- Scroll to first page
P+ Scroll to next page
P++ Scroll to last page
PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
PL- Scroll to first line of the page
PL-n Scroll n lines back
PL+ Scroll to last line of the page
PL+n Scroll n lines up
PNOP No effect
PP- Scroll back one page
PP-n Scroll n pages back
PP+ Scroll one page forward
PP+n Scroll n pages forwad
PPn Scroll to beginning of page n
PRI, PRINT Print
PS-- Scroll to first column
PS++ Scroll to last column
PS- Scroll one column to the left
PS-n Scroll n columns to the left
PS+ Scroll one column to the right
PS+n Scroll n columns to the right
PSn Scroll to column n
PZn Scroll to line n
RW Cancel

Similar Messages

  • AT LINE SELECTION AN AT USER-COMMAND IN ONE REPORT

    hiiii friends.....
    hw  can i go for both at line selection an at user comond in one report....
    ie if double click on basic list it should shw sm output an when i choose menu optoin it should perform sm other output......

    You need to crate a PF-Status and in the PF-staus you need to include some essentials buttons and the button for your list on the USER-COMMAND.
    Say,
    BACK
    EXIT
    CANC
    PICK ... should be assigned to F2 .. to work with LINE-SELECTION.
    NEW_LIST ... for USER-COMMAND
    In your report:
    START-OF-SELECTION.
      SET PF-STATUS 'Z_OWN'.
    AT LINE-SELECTION.
      WRITE : 'I AM LINE SELECTION'.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'NEW_LIST'.
           WRITE / 'I AM CALLED FROM USER COMMAND'.
      ENDCASE.
    Regards,
    Naimesh Patel

  • Refresh Report and At Line-Selection and At User-Command

    Hi All
    I have 2 querries
    1) I want to use At Line-selection and At user-command in the same report. But At line-selection is not getting triggered why? When I remove Set pf-status 'xxx' and at user command , then at line selection works . I want to user both at a time.
    2) I am giving user ability to edit the report shown and when he comes back by exiting the editing I want to refresh the report which is shown already to him to give effect of his editing.
    Thanks in anticipation
    pM.

    i just tried, and no problem at all.
    In the <b>Recommended Function Key Settings</b>  for  F2 key add command "PICK"
    Regards
    Raja
    since you are new to the forum, have a look at this weblog.
    /people/mark.finnern/blog/2004/08/10/spread-the-love

  • Using both at line-selection and at user-command

    hellow friends ,
    to use both  at line-selection and at user-command in the same report.

    Hello,
    U can do it like this.
    AT LINE-SELECTION.
      PERFORM at_line_selection.
    AT USER-COMMAND.
      PERFORM at_user_command.
    FORM AT_LINE_SELECTION.
      DATA: LV_CURSOR_FIELD(30).
      DATA: LV_MATNR TYPE MATNR.
      CLEAR H_UCOMM.
      GET CURSOR FIELD LV_CURSOR_FIELD.
      CASE LV_CURSOR_FIELD.
        WHEN 'PSPNR'.
          PERFORM LAGER_AN_PSP USING WA_MATNR-M1-RSNUM
                                     WA_MATNR-M1-RSPOS.
        WHEN 'PSPNR2'.
          H_UCOMM = 'PSPNR2'.
          IF NOT PSPNR2 IS INITIAL AND IT_VKBEL-VBELN CN '0123456789'.
            PERFORM LAGER_AN_PSP_VKBEL USING IT_VKBEL
                                             0
                                             PSPNR2
                                             H_MAKTX
                                             ' '.     "keine Blindbuchung
          ENDIF.
    ENDCASE.
    CASE SY-UCOMM.
        WHEN 'BACK_NEW'.
          PERFORM NEU_START USING 'X'.
        WHEN 'EXIT'.
          PERFORM NEU_START USING 'X'.
        WHEN 'CANC'.
          PERFORM NEU_START USING 'X'.
        WHEN 'CHECK'.
          PERFORM NEU_START USING SPACE.
    ENDCASE.
    Vasanth

  • ITS URGENT QUES ON AT LINE-SELECTION AND AT USER-COMMAND

    ITS URGENT...WHEN I SELECT MULTIPUL VALUES IN BASIC LIST ,I HAVE TO GET THOSE SELECTED MULTIPUL VALUES IN SECONDARY LIST THAT CAN BE AFTER(AT LINE-SELECTION OR AT USER-COMMAND)............?

    hey
    this code modify's simlarly u can read n  display secondary window
        DO .
    Reading the internal table whose data is displayed into wrk area.....
          READ LINE SY-INDEX FIELD VALUE INT_DISPLAY-SHIPMENT_ID INTO WF_SHIPMENT_ID.
    Reading the check box value
          READ LINE SY-INDEX FIELD VALUE WG_CHK.
    If all the records are read and there is no code left to read
          IF SY-SUBRC <> 0 .
            EXIT.
          ENDIF.
    To highlight the line which is selected by the user
          IF WG_CHK = WL_X.
            MODIFY CURRENT LINE
            LINE FORMAT COLOR COL_NEGATIVE INVERSE
            FIELD VALUE WG_CHK FROM WL_SPACE.
            MODIFY CURRENT LINE
            LINE FORMAT INPUT OFF.
    Also append the record read into new internal table which u will display in secondary window.......
          ENDIF.
        ENDDO.
    AT USER-COMMAND. or AT LINE SELECTION . u can write this code.........
    DISPLAYING A POP-UP WINDOW .
          WINDOW STARTING AT 10 50
                 ENDING AT 120 70.
    and then write the table into which u have stored the read entry which user had selected
    reward points if useful

  • At line-selection and At-user command

    Hi friends,
    Can we use both those events at a time in report?
    If so can any body provide me sample code?
    Regards

    <b>Example for AT LINE-SELECTION</b>
    REPORT demo_list_at_line_selection.
    START-OF-SELECTION.
      WRITE  'Basic List'.
    AT LINE-SELECTION.
      WRITE: 'Secondary List by Line-Selection',
           / 'SY-UCOMM =', sy-ucomm.
    When you run the program, the basic list appears with the standard list status. The detail list shows that SY-UCOMM has the value PICK.
    <b>Example for AT USER-COMMAND</b>
    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.
    I hope it helps.
    For more details have a look at below link.
    http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • How to use at-line selection in ALV

    Can someone help me about how to use at-line selection in an ALV

    u can try in user_command
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
             I_CALLBACK_PROGRAM = G_REPID
             IT_FIELDCAT = GT_FIELDCATALOG
             I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
             I_CALLBACK_HTML_END_OF_LIST = G_HTML_END_OF_LIST
             I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
             I_GRID_SETTINGS = GS_SETTINGS
             IS_LAYOUT = GS_LAYOUT
             I_SAVE = G_SAVE
             IS_VARIANT = GS_VARIANT
             IT_EVENTS = GT_EVENTS[]
    *      I_SCREEN_START_COLUMN = 0 "Use coordinates for
    *      I_SCREEN_START_LINE = 0 "display as dialog box
    *      I_SCREEN_END_COLUMN = 0
    *      I_SCREEN_END_LINE = 0
        IMPORTING
             E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
             ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
        TABLES
             T_OUTTAB = I_REP
        EXCEPTIONS
             PROGRAM_ERROR = 1
             OTHERS = 2.
    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
        WHEN '&IC1'.
          CASE RS_SELFIELD-FIELDNAME.
            WHEN 'XXXXX'.
              READ TABLE I_xxx INTO V_xxx
                WITH KEY XXX = RS_SELFIELD-VALUE.
              IF SY-SUBRC = 0.
              ENDIF.
            WHEN OTHERS
          ENDCASE.
      ENDCASE.
    ENDFORM.

  • In interactive how to use AT LINE-SELECTION WITH SET PF-STATUS

    Hi all,
             I am developing an interactive report in which i am using gui status (pf-status ) for AT USER-COMMAND and AT LINE-SELECTION  event .But when i used at line-selection event is  not working with pf-status even though i use PICK function code .
    plz help me to work with both the event i.e.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    Thanks a lot in Advance .
    Regards,
    Tarak

    hi,
      In PBO of Module Pool, Please Write in this way
    MODULE status_9001 OUTPUT.
    Set the PF-STATUS
      SET PF-STATUS '9001'.
    To Set the Title of Screen
      SET TITLEBAR 'TITLE'.
    ENDMODULE
    Setting PF status to the (SAP) system default
    set pf-status 'BASIC'.
    How to check for pf-status
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'ART'.
    PERFORM STYR_ARTSKONTI.
    WHEN 'PST'.
    PERFORM STYR_POSTER.
    WHEN 'BIL'.
    PERFORM VIS_BILAG.
    ENDCASE..

  • How to Use At line-Selection Functionality in dialog programming  or mpp .

    hi
    i had created customized Transaction ,
    in that  notification field is there , their when they  place notification number ,after that when they double click on that, it have to go to iw23 .(so that they will get confirm that notification  number is write  )
    i have tried to use AT LINE-SELECTION event it showing error ,
    where i have to write and which event i have to use ?
    may i know how can i resolve this ?
    Thanks a lot
    Edited by: raghu111 on Dec 3, 2011 6:14 AM

    hi  sharin.
    Thanks for ur reply
    i followed ur  steps 
    WHEN 'PICK'.
      DATA : dc_scrfield  TYPE zmotor-qmnum.
      GET CURSOR FIELD dc_scrfield.
      CHECK NOT dc_scrfield IS INITIAL.
      IF dc_scrfield = zmotor-qmnum.
        IF NOT zmotor-qmnum IS INITIAL .
          set PARAMETER ID 'IQM' FIELD zmotor-qmnum.
          call TRANSACTION 'IW23'.
        ENDIF. .
        ENDIF.
    its not working
    but i already tried like this .
    WHEN 'PICK'.
    if field name =tablename-fieldname
    set PARAMETER ID 'IQM' FIELD zmotor-qmnum
      call transaction 'IW23'
    endif
    i written in pai event ." i have dought here also whether i have to write here r not
    HERE ITS  WORKING BUT PROBLEM IS  FOR ANOTHER FIELDS ALSO ITS RESPONDING . how to stop the responding .
    as per my knowledge in condition only prob but i tried i didnt solve
    please send me one example or tell me how to solve
    for better understanding only i pasted coding
    thanks a lot
    Edited by: raghu111 on Dec 5, 2011 12:21 PM

  • Use of at PF AND AT USER COMMAND EVENTS

    can i know the use of at pf and at usercommand

    hi,
    pf-status.
    for example : i am displaying ouput using function module 'REUSE_ALV_LIST_DISPLAY' when u see the output of this there u will find standarad pf status. if requirement is not necesary to display all these buttons means u will create ur own pf status and keep required buttons insideit.
    at user command :
    for example u have one button in ur pf status : select_all
    when u click this button necessary action has to perform. this code u will write under this command.
    hope u got the point.
    thanks,
    maheedhar.t

  • At line-selection and user command

    hi,
    is it possible to use both at line selecion and at user command at a time.

    Hi Kiran,
      Yes, it is possible to use both at line selecion and at
      user command at a time.
    AT LINE-SELECTION.
    Event in interactive reporting
    This event is processed whenever the user chooses a valid line in the list (i.e. a line generated by statements such as WRITE,ULINE, or SKIP) with the cursor and presses the function key which has the function PICK in the interface definition. This should normally be the function key F2, because it has the same effect as double-clicking the mouse, or clicking once in the case of a hotspot.
    The processing for the event AT LINE-SELECTION usually generates further list output (the details list) which completely covers the current list display. If you want the current list display to remain visible (to aid user orientation), you can do this with the key word WINDOW.
    AT USER-COMMAND.
    Event in interactive reporting
    This event is executed whenever the user presses a function key in the list or makes an entry in the command field.
    DATA: NUMBER1 TYPE I VALUE 20,
          NUMBER2 TYPE I VALUE  5,
          RESULT  TYPE I.
    START-OF-SELECTION.
      WRITE: / NUMBER1, '?', NUMBER2.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'ADD'.
          RESULT = NUMBER1 + NUMBER2.
        WHEN 'SUBT'.
          RESULT = NUMBER1 - NUMBER2.
        WHEN 'MULT'.
          RESULT = NUMBER1 * NUMBER2.
        WHEN 'DIVI'.
          RESULT = NUMBER1 / NUMBER2.
        WHEN OTHERS.
          WRITE 'Unknown function code'.
          EXIT.
      ENDCASE.
      WRITE: / 'Result:', RESULT.
    After entry of a function code, the appropriate processing is performed under the event AT USER-COMMAND and the result is displayed in the details list.
    Reward points if helpful,
    Rgds,
    Sumana

  • At Line-selection in ALV for more than one field.

    How to use At Line-selection in ALV Basic Report where there are more than one field for displaying Secondary Lists.
    Ex: In Basic List there are 3 fields Volume_m Volume_y and Volume_i.When i click on any of the field i need to display the secondary list for that particular field.

    Hi Pavan,
                  Use User-command event of ALV.
    Refer this code :
    form BUILD_EVENTCAT  using    p_i_eventcat TYPE SLIS_T_EVENT.
    DATA: I_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = P_I_EVENTCAT
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.
      clear I_event.
      read table p_i_eventcat with key name = slis_ev_user_command into I_event.
      if sy-subrc = 0.
        move 'USER_COMMAND' to I_event-form.
        append I_event to p_i_eventcat.
      endif.
    form USER_COMMAND' using p_ucomm type sy-ucomm
                               p_selfield type slis_selfield.
      case p_ucomm.
      WHEN '&IC1'.                       "&IC1 is the Fcode for double click
    Use  P_ELFIELD-VALUE  for further processing . this  will contain the value on which u will double click
    endcase.
    Reward points if helpful.
    Regards,
    Hemant

  • How to go to previous pages using AT LINE-SELECTION

    Using AT LINE-SELECTION we can move on to next page up to 20 pages.
    Is it possible to go navigate to the previous pages?
    Letu2019s say, now I am in 15th page. I have to go to 5th page from 15th.
    Any comments appreciated.

    Hi,
    set your list index = 5 when u reach list 15.
    case:
    when Sy-lsind = 15.
       sy-lsind = 5.
    thanks,

  • How to use Hierarchy Filter Selection?

    Hi, experts !
    Could anyone give me a detail for how to use hierarchy filter selection ?
    When i locate a Hier filter selection in the template and execute it, a false info
    accured while filtering data,and the IE inferred the hier node object was missing.
    Then i add another hier filter in the same template, and the secend runs well, however the first one didn't.
    At last, i hide the first one, but the second one can't either.
    Help me !!!
    Thx in advance!

    Thanks Toja !
    Sorry to reply so late !
    The error is line: 51. error:'document.HIERARCHY_MENU_1.NODEID' is null or is not the object.
    The code on line of 51 says:document.HIERARCHY_MENU_1.NODEID.value = i_node;
    Could you please give me some documents on the topic of Hierarchy Filter Selection ?

  • How to handle at line-selection event for 2 different fields

    Hi,
    The requirement is there are 2 fields in a report output.
    One is Material number
    and the other is Material document number.
    On clicking the material number, the user should be taken to MM03 screen.
    On clicking the Material document number, the user should be taken to MB03 screen.
    I am able to take care of the first one by putting a HOTSPOT on material number and I am using at line-Selection event, call transaction MM03 and it is working fine
    I want to know how can I handle similarly for the document number?
    Thanks,
    Kumar.

    Hi,
    chk this sample code.
    Some part of code is higlighted which meets ur rewuirement.
    REPORT  z50871sd_rept_interactiverept NO STANDARD PAGE HEADING.
            STRUCTURE DECLARATIONS*
            INTERNAL TABLE  DECLARATIONS*
            WORKAREA DECLARATIONS*
    TYPES : BEGIN OF st_kna1,
             kunnr TYPE kna1-kunnr,            "CUSTOMER NUMBER
             name1 TYPE kna1-name1,            "CUSTOMER NAME
            END OF st_kna1.
    TYPES : BEGIN OF st_vbak,
             kunnr TYPE kna1-kunnr,
             vbeln TYPE vbak-vbeln,            "SALES DOCUMENT NUMBER
             erdat TYPE vbak-erdat,            "DATE ON WHICH THE RECORD WAS CREATED
             audat TYPE vbak-audat,            "DOCUMENT DATE
             auart TYPE vbak-auart,            "SALES DOCUMENT TYPE
             ernam TYPE vbak-ernam,            "NAME OF PERSON WHO CREATED THE OBJECT.
             augru TYPE vbak-augru,            "ORDER REASON
            END OF st_vbak.
    TYPES : BEGIN OF st_vbap,
             vbeln TYPE vbak-vbeln,
             posnr TYPE vbap-posnr,            "SALES DOCUMENT ITEM
             matnr TYPE vbap-matnr,            "MATERIAL NUMBER
             charg TYPE vbap-charg,            "BATCH NUMBER
             matkl TYPE vbap-matkl,            "MATERIAL GROUP
             posar TYPE vbap-posar,            "ITEM TYPE
           END OF st_vbap.
    DATA : it_kna1 TYPE STANDARD TABLE OF st_kna1,
           it_vbak TYPE STANDARD TABLE OF st_vbak,
           it_vbap TYPE STANDARD TABLE OF st_vbap,
           wa_kna1 TYPE st_kna1,
           wa_vbak TYPE st_vbak,
           wa_vbap TYPE st_vbap.
    DATA : v_fld(15),
           v_kunnr TYPE kna1-kunnr,
           v_vbeln TYPE vbak-vbeln.
            SELECT-OPTIONS*
             PARAMETERS*
    SELECT-OPTIONS so_kunnr FOR v_kunnr.          "CUSTOMER NUMBER
    PARAMETERS : p_max TYPE i.                    "NUMBER OF HITS
            START-OF-SELECTION*
    START-OF-SELECTION.
      PERFORM get_customerdata.
      SET PF-STATUS 'MENU1'.
         AT LINE-SELECTION**
    *AT LINE-SELECTION.*
      *IF sy-lsind = 1.*
        *PERFORM get_salesheader.*
      *ELSEIF sy-lsind = 2.*
        *PERFORM get_salesitemdata.*
      *ENDIF.*
         AT USER-COMMAND*
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'DISP'.
          PERFORM get_salesheader.
        WHEN 'ITEM'.
          PERFORM get_salesitemdata.
        WHEN 'VA03'.
          SET PARAMETER ID 'AUN' FIELD wa_vbak-vbeln.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
      ENDCASE.
         TOP-OF-PAGE*
    TOP-OF-PAGE.
      ULINE AT /1(56).
      WRITE : /1 sy-vline ,
               2(15) text-004 COLOR 1 ,
               sy-vline ,
               20(35) text-005 COLOR 1 ,
               sy-vline.
      ULINE AT /1(56).
         TOP-OF-PAGE DURING LINE-SELECTION.*
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE sy-lsind.
        WHEN 1.
          PERFORM get_topofpage1.
        WHEN 2.
          PERFORM get_topofpage2.
      ENDCASE.
         FORM GET_CUSTOMERDATA*
    FORM get_customerdata.
      SELECT kunnr name1
             FROM kna1
             INTO TABLE it_kna1
             UP TO p_max ROWS
           WHERE kunnr IN so_kunnr.
      IF sy-subrc EQ 0.
        LOOP AT it_kna1 INTO wa_kna1.
          WRITE : / sy-vline,
                    2(15) wa_kna1-kunnr ,
                    sy-vline ,
                    20 wa_kna1-name1,
                    sy-vline.
          HIDE : wa_kna1-kunnr , wa_kna1-name1.
          CLEAR wa_kna1.
        ENDLOOP.
        ULINE AT : /1(56).
      ELSE.
        MESSAGE w000(z50871msg).
      ENDIF.
    ENDFORM.                    "GET_CUSTOMERDATA
         FORM GET_SALESHEADER*
    FORM get_salesheader.
      SET PF-STATUS 'MENU2'.
      GET CURSOR FIELD v_fld VALUE v_kunnr.
      IF v_fld = 'WA_KNA1-KUNNR'.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = v_kunnr
          IMPORTING
            output = v_kunnr.
        SELECT kunnr vbeln erdat audat auart ernam augru
               FROM vbak
               INTO TABLE it_vbak
             WHERE kunnr = v_kunnr.
        IF sy-subrc EQ 0.
          LOOP AT it_vbak INTO wa_vbak.
            WRITE : / sy-vline ,
                      2(22) wa_vbak-vbeln ,
                      sy-vline,
                      27(25) wa_vbak-erdat ,
                      sy-vline ,
                      55(15) wa_vbak-audat ,
                      sy-vline ,
                      73(15) wa_vbak-auart ,
                      sy-vline,
                      91(16) wa_vbak-ernam ,
                      sy-vline,
                      109(13) wa_vbak-augru,
                      123 sy-vline.
            HIDE : wa_vbak-vbeln.
            CLEAR wa_vbak.
          ENDLOOP.
          *ULINE AT : /1(123).*
        ELSE.
          MESSAGE i015(z50871msg).
        ENDIF.
      ELSE.
        MESSAGE i013(z50871msg).
      ENDIF.
    ENDFORM.                    "GET_SALESHEADER
         FORM GET_SALESITEMDATA
    FORM get_salesitemdata.
      SET PF-STATUS space.
      GET CURSOR FIELD v_fld VALUE v_vbeln.
      IF v_fld = 'WA_VBAK-VBELN'.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = v_vbeln
          IMPORTING
            output = v_vbeln.
        SELECT vbeln posnr matnr charg matkl posar
               FROM vbap
               INTO TABLE it_vbap
             WHERE vbeln = v_vbeln.
        LOOP AT it_vbap INTO wa_vbap.
          WRITE : /1 sy-vline,
                   2(13) wa_vbap-posnr ,
                   sy-vline,
                   18(18) wa_vbap-matnr ,
                   sy-vline,
                   40(13) wa_vbap-charg ,
                   sy-vline,
                   56(16) wa_vbap-matkl ,
                   sy-vline,
                   75 wa_vbap-posar,
                   112 sy-vline.
          CLEAR wa_vbap.
        ENDLOOP.
        ULINE AT : /1(112).
      ELSE.
        MESSAGE i014(z50871msg).
      ENDIF.
    ENDFORM.                    "GET_SALESITEMDATA
         FORM GET_TOPOFPAGE1
    FORM get_topofpage1.
      ULINE AT : /1(123).
      WRITE : / sy-vline ,
                2 text-000 ,
                wa_kna1-kunnr ,
                75 text-001 ,
                wa_kna1-name1,
                123 sy-vline.
      ULINE AT : /1(123).
      WRITE : / sy-vline ,
                  2(22) text-006 COLOR 1,
                  sy-vline,
                  27(25) text-007 COLOR 1 ,
                  sy-vline ,
                  55(15) text-008 COLOR 1 ,
                  sy-vline ,
                  73(15) text-009 COLOR 1 ,
                  sy-vline,
                  91(16) text-010 COLOR 1 ,
                  sy-vline,
                  109(13) text-011 COLOR 1,
                  123 sy-vline.
      ULINE AT : /1(123).
    ENDFORM.                    "GET_TOPOFPAGE1
         FORM GET_TOPOFPAGE2
    FORM get_topofpage2.
      ULINE AT : /1(112).
      WRITE : / sy-vline ,
                2 text-000 ,
                wa_kna1-kunnr ,
                35 text-001 ,
                wa_kna1-name1 ,
                85 text-003 ,
                wa_vbak-vbeln ,
                112 sy-vline.
      ULINE AT : /1(112).
      WRITE : /1 sy-vline,
               2(13) text-012 COLOR 1,
               sy-vline,
               18(18) text-013 COLOR 1 ,
               sy-vline,
               40(13) text-014 COLOR 1  ,
               sy-vline,
               56(16) text-015 COLOR 1 ,
               sy-vline,
               75 text-016 COLOR 1 ,
               112 sy-vline.
      ULINE AT : /1(112).
    ENDFORM.                    "GET_TOPOFPAGE2
    Regards
    Sandeep Reddy

Maybe you are looking for

  • Self billing invoice with input tax code

    Hello experts, we are currently trying to implement a billing procedure with credit memos within the module SD. In this set-up the recipient of a service (company using the SAP) creates a credit memo for the renderer of a service (a debitor in SAP) s

  • Is there any way to recover files on a corrupted drive if I can book to Lion Recovery Assistant?

    Is there anyway to recover files from a corrupted drive if I can boot to the on-disk Lion Recovery Assistant?  Unfortunately Apple replaced my screen in December and wiped my hard drive.  I restored my files from Time Machine but have not done a back

  • ADF Mobile bundle extension issue

    Hi I've just installed adf_mobile_bundle extension in Jdeveloper (as described here https://blogs.oracle.com/brunoborges/entry/first_steps_with_oracle_adf). It seems ok,but jdeveloper ,once, restarted doesn't reflect the changing expected : no ADF mo

  • Log File Error - Is this my Responsibility?

    Hi server admin people, I'm a customer who is trying to kill an application hosted by my ISP. I've removed and deleted all related directories and files on my ISP's server and told them I don't need ColdFusion support anymore. However, they want to c

  • Can't be copied because it is too large for the volume's format

    When I try to save a movie i get the following message:  can't be copied because it is too large for the volume's format.  What can I do