How to skip first screen while calling transaction

Hi all,
I am using interactive alv.
if i select one line and press details
that must go to another screen.
In that i must skip first screen and directly go to the details of that first screen.
suppose i am using the code as follows
call transaction mm01 and skip first screen
this is giving me error.
how to solve the problem.
thanks and regards,
giri.

hi giri,
For ur requirement, u can use SKIP FIRST SCREEN addition for CALL TRANSACTION Command.
Before this, u have to use SET PARAMETER ID Command to pass the required values for transaction.
Example, In transaction VA01, we have to set parameter AUN to pass the sale order number to the transaction.
<b>
AT LINE-SELECTION .
SET PARAMETER ID 'AUN' FIELD w_vbeln.
CALL TRANSACTION 'VA01' AND SKIP FIRST SCREEN .</b>
where w_vbeln contains the sale ordre number. Now VA01 runs for this sale order number..... And AUN is the PARAMETER to be set before calling VA01 TCODE.
similarly, check the PARAMETER associated with MM01 Tcode and initialize that parameter and call the code in the similar way.
To check parameter Id of MM01,
1) Enter MM01 Transaction
2) Press F1 on Material Field
3) Select Technical Info
4) u can find Parameter ID associated with this field.
check these links for full details.
call transaction...
http://help.sap.com/saphelp_47x200/helpdata/en/78/21761c51ce11d189570000e829fbbd/frameset.htm
at line selection,
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba2c435c111d1829f0000e829fbfe/frameset.htm
get/set parameter:
http://help.sap.com/saphelp_nw04/helpdata/en/5b/7bc3775d1111d295ad0000e82de14a/frameset.htm
Reward me if useful........
Harimanjesh AN

Similar Messages

  • Skip first screen when calling transaction via  BDC

    I need to use BDC to call transaction FD32 and suppress the first screen. Do I need to set BDC_OKCODE? However, when I set BDC_OKCODE to '/00', this error occured, "System error: Error in routine DYNPRO_ERSTES_BILD".
    Here is my code:
    CLEAR ls_bdcdata.
    ls_bdcdata-program  = 'SAPMF02C'.
    ls_bdcdata-dynpro   = '0100'.
    ls_bdcdata-dynbegin = 'X'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-KUNNR'.
    ls_bdcdata-fval = gs_data-kunnr.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-KKBER'.
    ls_bdcdata-fval = p_kkber.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-D0105'.
    ls_bdcdata-fval = 'X'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'BDC_OKCODE'.
    ls_bdcdata-fval = '/00'.
    APPEND ls_bdcdata TO lt_bdcdata.
    opt-dismode = 'E'.
    opt-defsize = 'X'.
    CALL TRANSACTION 'FD32' USING lt_bdcdata OPTIONS FROM opt.
    Any suggestions?

    Hi,
    Try this..This is working fine for me..
    CLEAR ls_bdcdata.
    ls_bdcdata-program = 'SAPMF02C'.
    ls_bdcdata-dynpro = '0100'.
    ls_bdcdata-dynbegin = 'X'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'BDC_CURSOR'.
    ls_bdcdata-fval = 'RF02L-D0110'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'BDC_OKCODE'.
    ls_bdcdata-fval = '/00'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-KUNNR'.
    ls_bdcdata-fval = gs_data-kunnr.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-KKBER'.
    ls_bdcdata-fval = p_kkber.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-D0105'.
    ls_bdcdata-fval = 'X'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-D0110'.
    ls_bdcdata-fval = 'X'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CLEAR ls_bdcdata.
    ls_bdcdata-fnam = 'RF02L-D0120'.
    ls_bdcdata-fval = 'X'.
    APPEND ls_bdcdata TO lt_bdcdata.
    CALL TRANSACTION 'FD32' USING lt_bdcdata MODE 'E'.
    Thanks,
    Naren

  • How to skip first screen that is not selection screen.

    Hi Experts
    I am working on a module pool program where in I am required to call a transaction with skip first screen. the first screen of this transaction is self made screen with screen painter with input boxes and a submit button with an OK_CODE. now I am able to get all the input boxes filled during the call, however as the ok_code is missing it is not skipping first screen, neither does the PAI of first screen of called transaction is getting fired, is there any way to fire it?

    I discovered that once I set the parameter of sy-ucomm and then called the transaction it worked. check the code if you need the help on same
    ACTION = 'VW'.
      value = 'V01'.
      SET PARAMETER ID 'SPM' FIELD SPMON.
      SET PARAMETER ID 'VRS' FIELD VRSIO.
      SET PARAMETER ID 'VKB' FIELD WA_INDEX-L_VKBUR.
      SET PARAMETER ID 'DFM' FIELD ZSDTPLANVRSIO-DAT_FRM.
      SET PARAMETER ID 'DFT' FIELD ZSDTPLANVRSIO-DAT_TO.
      set PARAMETER ID 'ACT' field action.
      set PARAMETER ID 'OKC' field value.
    call TRANSACTION 'ZPLAN_INT' AND SKIP FIRST SCREEN.{/code}
    this OKC parameter id holds the value for sy-ucomm and the screen 100 of the called transaction has been skiped and ALV was displayed direct away.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'ZAO_MAIN'.
      SET TITLEBAR 'ZAO'.
      if pass <> 1.
      get PARAMETER ID 'ACT' FIELD action.
      get PARAMETER ID 'SPM' FIELD SPMON.
      get PARAMETER ID 'VRS' FIELD VRSIO.
      get PARAMETER ID 'VKB' FIELD knvv-VKBUR.
      get PARAMETER ID 'DFM' FIELD ZSDTPLANVRSIO-DAT_FRM.
      get PARAMETER ID 'DFT' FIELD ZSDTPLANVRSIO-DAT_TO.
      get PARAMETER ID 'OKC' field sy-ucomm.
    set PARAMETER ID 'ACT' field action.
      endif. {/code}

  • Problems with SKIP FIRST Screen when calling a transaction variant

    Hi,
    I have a transaction variant of VA02 that suppresses the display of the pricing button on the conditions screen. I have created a variant transaction for called ZA02 which calls this variant of VA02.
    In my program I have coded the following :-
          SET PARAMETER ID 'AUN' FIELD  VBELN.
          SET PARAMETER ID 'VPO' FIELD  POSNR.
          CALL TRANSACTION 'ZA02' AND SKIP FIRST SCREEN.
    I would have expected the program to display the second screen of VA02 but it displays the first screen and when I hit return key the second screen is then displayed.
    I don't think I need VPO setting but when I code
          SET PARAMETER ID 'AUN' FIELD  VBELN.
          SET PARAMETER ID 'VPO' FIELD  POSNR.
          CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    VA02's second screen is displayed
    Any help as to how to Skip this first screen with ZA02 would be greatly appreciated
    Thanks
    Rous

    Yes you are right Reg thanks for that.
    But it appears that VA02 doesn't require it setting anyway. I changed the PID to APO and indeed I've even commented the line out, but my program goes to the second screen when calling VA02 but stays on the first screen when calling ZA02 .

  • Can we skip the first screen after call transaction has been performed?

    Hello Friends,
    I have written a program for INTERCATIVE REPORT .
    When i click on the link it needs to call transcation MD4C.
    I have written a BDC for calling the transaction and skipped first screen.Its working fine but the problem is that WHEN I TRY TO COME BACK TO MY REPORT OUTPUT USING(BACK OR EXIT OR CANCEL) BUTTONS THE CONTROL IS PASSING THRU THE FIRST SCREEN OF TRANSACTION MD4C and then its coming back to report output.
    Now i dont need the first screen of the MD4C to be dispalyed when i use the BUTTONS.
    That means i want to dirctly come to report output when i click (BACK OR EXIT OR CANCEL) BUTTONS.
    Hope the problem is clear.
    Is there any way?
    Please do suggest me.
    Thankx in advance,
    Sanghamitra.

    Hello everybody,
    Thanks a lot for the quick replies.
    The problem i m facing comes after the call transaction statement gets executed.
    when the statement gets executed i m able to skip first screen and goto the required screen in the transaction but WHEN I PRESS BACK BUTTON THERE it is showing the initial screen which i have skipped.I dont want this scrren to be dispalyed.When i press back it should directly take me to the report output from where i have come to this transaction.
    Hope i m clear now?
    Any suggestions.
    Regards,
    Sanghamitra.

  • Skipping multiple screens when calling transaction.

    Hi Gurus,
    It's quite easy to call transaction mm03 with from an ABAP program.
    Filling the parameter ID MAT with the material, and you're good to go.
    Call transaction 'MM03' and skip first screen.
    So far so good. But is it also possible to enter data for the next screens (you have to select a view and plant). Now the user still has to enter that data and I was wondering if I could do that automatically...
    kind regards,
    Ron.

    Hi
    CALL TRANSACTION ta USING bdc_tab
    bdc_tab of row type BDCDATA from the ABAP Dictionary
    regards
    Pavan

  • How to skip first screen in an LSMW

    Hi All,
      Can anyone please tell me, if its possible to skip a screen while doing a recording using an LSMW.
    The following are the two options to achieve it:
    1) Create a separate recording where that screen is not used
    2) Is it possible to achieve this through some kind of coding.
    Please help.
    Thanks and Regards,
    Arti Dohare

    Aarti,
    Yes we need to choose Transaction with Parameters
    While creating a t-code in SE93 after giving the short text for the tcode you will find START OBJECT where in you will get to see 4 options choose the "Transaction with Parameters(parameter transaction)
    Then in the next screen you will get to see a sub screen at the bottom with text as DEFAULT VALUES,in the screen
    give the OBJECT under the name of the screen field and in the value give the Object name and SubProject and its name.
    Name of the screen field -
    value
    OBJECT----
    ZXX
    SUBPROJECT----
    ZXX
    K.Kiran.

  • How to skip first screen of XK03 in Webdynpro ABAP

    Hello Experts,
    I am working on one webdynpro application where I am displaying transaction XK03 based on Link to Action of the particular vendor. But my problem is that I wanted skip first screen of XK03 so that directely I can go to display mode. Plz help me out...
    Thanks
    Basanagouda

    see the forum please: Web Dynpro ABAP

  • How to skip first record while inserting data from a flat file to BW system

    Hi Experts,
    In my project we have to upload flat file into a BW system. I have written a program and it is working fine.
    Now we have got another requirement. The flat file will have a header record (first row). While uploading the flat file we have to skip this record. How I can do so?
    The code is as below:
    FORM upload1.
      DATA : wf_title    TYPE string,
              lt_filetab  TYPE filetable,
              l_separator TYPE char01,
              l_action    TYPE i,
              l_count     TYPE i,
              ls_filetab  TYPE file_table,
              wf_delemt TYPE rollname,
              wa_fieldcat TYPE lvc_s_fcat,
              tb_fieldcat TYPE lvc_t_fcat,
              rows_read TYPE i,
              p_error   TYPE char01,
              l_file      TYPE string.
      DATA: wf_object(30)  TYPE c,
              wf_tablnm TYPE rsdchkview.
      wf_object = 'myprogram'.
      DATA i TYPE i.
      DATA:
           lr_mdmt                TYPE REF TO cl_rsdmd_mdmt,
           lr_mdmtr               TYPE REF TO cl_rsdmd_mdmtr,
           lt_idocstate           TYPE rsarr_t_idocstate,
           lv_subrc               TYPE sysubrc.
      TYPES : BEGIN OF test_struc,
               /bic/myprogram TYPE  /bic/oimyprogram,
               txtmd   TYPE rstxtmd,
               END OF test_struc.
      DATA :    tb_assum TYPE TABLE OF /bic/pmyprogram.
      DATA: wa_ztext TYPE  /bic/tmyprogram,
            myprogram_temp TYPE ziott_assum,
            wa_myprogram TYPE /bic/pmyprogram.
      DATA : test_upload TYPE STANDARD TABLE OF test_struc,
             wa2 TYPE  test_struc.
      DATA : wa_test_upload TYPE test_struc,
             ztable_data TYPE TABLE OF /bic/pmyprogram,
             ztable_text TYPE TABLE OF /bic/tmyprogram,
             wa_upld_text TYPE /bic/tmyprogram,
             wa_upld_data TYPE /bic/pmyprogram,
              t_assum TYPE ziott_assum.
      DATA : wa1 LIKE  test_upload.
      wf_title = text-026.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = wf_title
          default_extension       = 'txt'
          file_filter             = 'Tab delimited Text Files (*.txt)'
        CHANGING
          file_table              = lt_filetab
          rc                      = l_count
          user_action             = l_action
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          OTHERS                  = 3.                          "#EC NOTEXT
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      LOOP AT lt_filetab INTO ls_filetab.
        l_file = ls_filetab.
      ENDLOOP.
      CHECK l_action = 0.
      IF l_file IS INITIAL.
        EXIT.
      ENDIF.
      l_separator = 'X'.
      wa_fieldcat-fieldname = 'test'.
      wa_fieldcat-dd_roll = wf_delemt.
      APPEND wa_fieldcat TO tb_fieldcat.
      CALL FUNCTION 'MESSAGES_INITIALIZE'.
      CLEAR wa_test_upload.
    Upload file from front-end (PC)
    File format is tab-delimited ASCII
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = l_file
          has_field_separator     = l_separator
        TABLES
         data_tab                = i_mara
        data_tab                   = test_upload
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        EXIT.
      ELSE.
       CALL FUNCTION 'MESSAGES_INITIALIZE'.
        IF test_upload IS NOT INITIAL.
          DESCRIBE TABLE test_upload LINES rows_read.
          CLEAR : wa_test_upload,wa_upld_data.
          LOOP AT test_upload INTO wa_test_upload.
            CLEAR :  p_error.
            rows_read = sy-tabix.
            IF wa_test_upload-/bic/myprogram IS INITIAL.
              p_error = 'X'.
              MESSAGE s153 WITH wa_test_upload-/bic/myprogram sy-tabix.
              CONTINUE.
            ELSE.
              TRANSLATE wa_test_upload-/bic/myprogram TO UPPER CASE.
              wa_upld_text-txtmd  = wa_test_upload-txtmd.
              wa_upld_text-txtsh  = wa_test_upload-txtmd.
              wa_upld_text-langu =  sy-langu.
              wa_upld_data-chrt_accts = 'xyz1'.
              wa_upld_data-co_area = '12'.
              wa_upld_data-/bic/zxyzbcsg = 'Iy'.
              wa_upld_data-objvers = 'A'.
              wa_upld_data-changed = 'I'.
              wa_upld_data-/bic/zass_mdl = 'rrr'.
              wa_upld_data-/bic/zass_typ = 'I'.
              wa_upld_data-/bic/zdriver = 'yyy'.
              wa_upld_text-langu = sy-langu.
              MOVE-CORRESPONDING wa_test_upload TO wa_upld_data.
              MOVE-CORRESPONDING wa_test_upload TO wa_upld_text.
              APPEND wa_upld_data TO ztable_data.
              APPEND wa_upld_text TO ztable_text.
            ENDIF.
          ENDLOOP.
          DELETE ADJACENT DUPLICATES FROM ztable_data.
          DELETE ADJACENT DUPLICATES FROM ztable_text.
          IF ztable_data IS NOT INITIAL.
            CALL METHOD cl_rsdmd_mdmt=>factory
              EXPORTING
                i_chabasnm     = 'myprogram'
              IMPORTING
                e_r_mdmt       = lr_mdmt
              EXCEPTIONS
                invalid_iobjnm = 1
                OTHERS         = 2.
       CALL FUNCTION 'MESSAGES_INITIALIZE'.
       **Lock the Infoobject to update
            CALL FUNCTION 'RSDG_IOBJ_ENQUEUE'
              EXPORTING
                i_objnm      = wf_object
                i_scope      = '1'
                i_msgty      = rs_c_error
              EXCEPTIONS
                foreign_lock = 1
                sys_failure  = 2.
            IF sy-subrc = 1.
              MESSAGE i107(zddd_rr) WITH wf_object sy-msgv2.
              EXIT.
            ELSEIF sy-subrc = 2.
              MESSAGE i108(zddd_rr) WITH wf_object.
              EXIT.
            ENDIF.
    *****Update Master Table
            IF ztable_data IS NOT INITIAL.
              CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
                    EXPORTING
                      i_iobjnm                     = 'myprogram'
                      i_tabclass                   = 'M'
           I_T_ATTR                     = lt_attr
                    TABLES
                      i_t_table                    = ztable_data
                      EXCEPTIONS
                     attribute_name_error         = 1
                     iobj_not_found               = 2
                     generate_program_error       = 3
                     OTHERS                       = 4.
              IF sy-subrc <> 0.
                CALL FUNCTION 'MESSAGE_STORE'
                  EXPORTING
                    arbgb  = 'zddd_rr'
                    msgty  = 'E'
                    txtnr  = '054'
                    msgv1  = text-033
                  EXCEPTIONS
                    OTHERS = 3.
                MESSAGE e054(zddd_rr) WITH 'myprogram'.
              ELSE.
                CALL FUNCTION 'MESSAGE_STORE'
                  EXPORTING
                    arbgb  = 'zddd_rr'
                    msgty  = 'S'
                    txtnr  = '053'
                    msgv1  = text-033
                  EXCEPTIONS
                    OTHERS = 3.
              ENDIF.
    *endif.
    *****update Text Table
              IF ztable_text IS NOT INITIAL.
                CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
                  EXPORTING
                    i_iobjnm               = 'myprogram'
                    i_tabclass             = 'T'
                  TABLES
                    i_t_table              = ztable_text
                  EXCEPTIONS
                    attribute_name_error   = 1
                    iobj_not_found         = 2
                    generate_program_error = 3
                    OTHERS                 = 4.
                IF sy-subrc <> 0.
                  CALL FUNCTION 'MESSAGE_STORE'
                    EXPORTING
                      arbgb  = 'zddd_rr'
                      msgty  = 'E'
                      txtnr  = '055'
                      msgv1  = text-033
                    EXCEPTIONS
                      OTHERS = 3.
                ENDIF.
              ENDIF.
            ELSE.
              MESSAGE s178(zddd_rr).
            ENDIF.
          ENDIF.
          COMMIT WORK.
          CALL FUNCTION 'RSD_CHKTAB_GET_FOR_CHA_BAS'
            EXPORTING
              i_chabasnm = 'myprogram'
            IMPORTING
              e_chktab   = wf_tablnm
            EXCEPTIONS
              name_error = 1.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    ****Release locks on Infoobject
          CALL FUNCTION 'RSDG_IOBJ_DEQUEUE'
            EXPORTING
              i_objnm = 'myprogram'
              i_scope = '1'.
        ENDIF.
      ENDIF.
      PERFORM data_selection .
      PERFORM update_alv_grid_display.
      CALL FUNCTION 'MESSAGES_SHOW'.
    ENDFORM.
    Please let me know how I can skip first record of the flat file?
    Regards,
    S

    go through this hope u can get some idea
    REPORT  ztest no standard page heading line-size 255.
                          Declaration                            *
    TYPES t_itab1 TYPE alsmex_tabline.
    types: begin of t_csks,
           kostl like csks-kostl,
          end of t_csks.
    types: begin of t_cska,
           kstar like cska-kstar,
          end of t_cska.
    data: begin of t_flatfile,
          docdate like COHEADER-BLDAT,
          postdate like COHEADER-BUDAT,
          doctext like COHEADER-BLTXT,
           costele like RK23F-KSTAR,
           amount like RK23F-WTGBTR,
           scostctr like RK23F-SKOSTL,
           rcostctr like RK23F-EKOSTL,
           rintorder like RK23F-EAUFNR,
         end of t_flatfile.
    data: begin of t_flatfile1,
          docdate like COHEADER-BLDAT,
          postdate like COHEADER-BUDAT,
          doctext like COHEADER-BLTXT,
           costele like RK23F-KSTAR,
           amount like RK23F-WTGBTR,
           scostctr like RK23F-SKOSTL,
           rcostctr like RK23F-EKOSTL,
           rintorder like RK23F-EAUFNR,
           NUM LIKE SY-INDEX,
         end of t_flatfile1.
    data: itab like table of t_flatfile with header line.
    data: itab2 like table of t_flatfile1 with header line.
    DATA: it_itab1 TYPE STANDARD TABLE OF t_itab1 WITH HEADER LINE,
          MESSTAB1 LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE,
          MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    data: begin of bdcdata occurs 0.
            include structure bdcdata.
    data: end of bdcdata.
    data:t_lin type i VALUE '0',
         u_rec type i VALUE '0',
         s_rec type i VALUE '0'.
    data: it_csks type standard table of t_csks,
          wa_csks type t_csks.
    data: it_cska type standard table of t_cska,
          wa_cska type t_cska.
    *Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME  TITLE text-010.
    parameters: p_docdat  LIKE  COHEADER-BLDAT obligatory,
                p_postda LIKE  COHEADER-BUDAT obligatory,
                p_doctxt  LIKE  COHEADER-BLTXT.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME  TITLE text-011.
    parameters: p_file LIKE RLGRAP-FILENAME obligatory,
                DIS_MODE LIKE CTU_PARAMS-DISMODE DEFAULT 'N'.
    SELECTION-SCREEN END OF BLOCK b2.
                  A T  S E L E C T I O N   S C R E E N                  *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM get_local_file_name USING p_file.
    *Start of Selection
    START-OF-SELECTION.
      Perform get_Excel_data.
      perform validate_data.
      Perform Process_Data.
                    end-of-selection
    end-of-selection.
      perform display_data.
    *&      Form  get_local_file_name
          text
         -->P_P_FILE  text
    FORM get_local_file_name  USING    P_P_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name = p_file.
    ENDFORM.                    " get_local_file_name
    *&      Form  get_Excel_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_Excel_data .
      FIELD-SYMBOLS : <FS>.
      DATA : V_INDEX TYPE I.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_file
          i_begin_col             = 1
        i_begin_row             = 2
          i_begin_row             = 1
          i_end_col               = 256
          i_end_row               = 9999                        "65536
        TABLES
          intern                  = it_itab1
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        Message text-013 type 'E'.
      ENDIF.
      IF IT_ITAB1[] IS INITIAL.
        Message text-001 type 'E'.
      else.                                    "IF IT_ITAB1[] IS INITIAL.
        data: itab2 like itab occurs 0 with header line.
        SORT IT_ITAB1 BY ROW COL.
        LOOP AT IT_ITAB1.
          MOVE :IT_ITAB1-COL TO V_INDEX.
          ASSIGN COMPONENT V_INDEX OF STRUCTURE itab2 TO  <FS>.
          MOVE : IT_ITAB1-VALUE TO <FS>.
          AT END OF ROW.
            MOVE-CORRESPONDING itab2 TO itab.
            APPEND itab.
            CLEAR:itab,itab2.
          ENDAT.
        endloop.
        describe table itab lines t_lin.
      endif.               "IF IT_ITAB1[] IS INITIAL.
    ENDFORM.                    " get_Excel_data
    *&      Form  Process_Data
          text
    -->  p1        text
    <--  p2        text
    FORM Process_Data .
      data:l_tabix type sy-tabix.
      data:l_periv like t001-periv,
           l_monat like bkpf-monat,
           l_gjahr like bkpf-gjahr,
           l_amt(21) type c.
      data: l_ddate(10),
            l_pdate(10).
      WRITE p_docdat TO l_ddate.
      WRITE p_postda TO l_pdate.
      clear: l_periv,l_monat,l_gjahr.
      select single periv from t001 into l_periv where bukrs = '5000'. "P_bukrs
      if sy-subrc eq 0.
        l_gjahr = p_postda+0(4).
        call function 'FI_PERIOD_DETERMINE'
          EXPORTING
            i_budat = p_postda
            i_bukrs = '5000'     "p_bukrs
            i_periv = l_periv
            i_gjahr = l_gjahr
          IMPORTING
            e_monat = l_monat.
        clear:l_periv.
      endif.
      loop at itab2.
        refresh:bdcdata.
        clear:bdcdata.
        l_tabix = sy-tabix.
        perform bdc_dynpro      using 'SAPLK23F1' '1200'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/00'.
        perform bdc_field       using 'COHEADER-SEND_REC_REL'
                                      '10SAP'.
        perform bdc_field       using 'RK23F-STATUS'
                                      'S'.
        perform bdc_field       using 'COHEADER-BLDAT'
                                 itab-docdate.
                                      l_ddate.
        perform bdc_field       using 'COHEADER-BUDAT'
                                 itab-postdate.
                                      l_pdate.
        perform bdc_field       using 'COHEADER-PERIO'
                                       l_monat.                 "'9'.
        perform bdc_field       using 'COHEADER-BLTXT'
                                 itab-doctext.
                                      p_doctxt.
        perform bdc_field       using 'RK23F-KSTAR'
                                      itab2-costele.
        WRITE itab2-amount TO l_amt.
    l_amt = itab-amount.
        condense l_amt no-gaps.
        perform bdc_field       using 'RK23F-WTGBTR'
                                       l_amt.
                                 itab-amount.
        perform bdc_field       using 'RK23F-WAERS'
                                      'USD'.
    *perform bdc_field       using 'RK23F-SGTXT'
                                 itab-doctext.
        perform bdc_field       using 'RK23F-SKOSTL'
                                      itab2-scostctr.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RK23F-EAUFNR'.
        perform bdc_field       using 'RK23F-EKOSTL'
                                      itab2-rcostctr.
        perform bdc_field       using 'RK23F-EAUFNR'
                                      itab2-rintorder.
        perform bdc_dynpro      using 'SAPLK23F1' '1200'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=POST'.
        perform bdc_field       using 'COHEADER-SEND_REC_REL'
                                      '10SAP'.
        perform bdc_field       using 'RK23F-STATUS'
                                      'S'.
        perform bdc_field       using 'COHEADER-BLDAT'
                                 itab-docdate.
                                      l_ddate.
        perform bdc_field       using 'COHEADER-BUDAT'
                                  itab-postdate.
                                      l_pdate.
        perform bdc_field       using 'COHEADER-PERIO'
                                 '9'.
                                        l_monat.
        perform bdc_field       using 'COHEADER-BLTXT'
                                  itab-doctext.
                                      p_doctxt.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RK23F-KSTAR'.
        perform bdc_field       using 'RK23F-WAERS'
                                      'USD'.
        CALL TRANSACTION 'KB15N' USING BDCDATA MODE DIS_MODE MESSAGES INTO MESSTAB.
        If sy-subrc = 0.
          s_rec = s_rec + 1.
        ELSE.
          u_rec = u_rec + 1.
          move ITAB2-NUM to messtab1-msgv1.
          concatenate itab2-costele ' | ' itab2-scostctr  ' | '  itab2-rcostctr ' | ' itab2-rintorder  into  messtab1-msgv2.
          condense messtab1-msgv2.
          condense messtab1-msgv1.
          append messtab1.
        endif.
        clear:itab2.
      endloop.
    ENDFORM.                    " Process_Data
          BDC_DYNPRO                                                     *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
           BDC_FIELD                                                     *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> ''. "NODATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      skip 2.
      write:/15 text-002.
      skip 2.
      write:/8 text-003.
      SKIP.
      write:/12 text-008,
             25 P_DOCDAT.
      SKIP.
      write:/12 text-009,
             25 P_POSTDA.
      SKIP.
      write:/12 text-012,
              25 P_DOCTXT.
      SKIP.
      write:/12 text-004,
             25 p_file.
      skip 2.
      write:/8 text-005,
            60 t_lin.
      skip.
      write:/8 text-006,
            60 s_rec.
      skip.
      write:/8 text-007,
            60 u_rec.
      skip.
      write:/10 'row no',
             20 'Information'.
      skip.
      loop at messtab1.
        write:/10 messtab1-msgv1,
               20 messtab1-msgv2.
        clear:messtab1.
      endloop.
    ENDFORM.                    " display_data
    *&      Form  validate_data
          text
    -->  p1        text
    <--  p2        text
    FORM validate_data .
      data: l_tabix1 type sy-tabix.
    data: l_tabix2 type sy-tabix.
      if not itab[] is initial.
        select kostl from CSKS into table it_csks.
        if sy-subrc eq 0.
          sort it_csks by kostl.
        endif.
        select kstar from CSKA into table it_cska.
        if sy-subrc eq 0.
          sort it_cska by kstar.
        endif.
        loop at itab.
          l_tabix1 = sy-tabix.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = itab-scostctr
    IMPORTING
       OUTPUT        = itab-scostctr .
          read table it_csks into wa_csks with key kostl = itab-scostctr.
          if sy-subrc ne 0.
            u_rec = u_rec + 1.
           L_TABIX2 = l_tabix1 + 1.
           move l_tabix2 to messtab1-msgv1.
            move l_tabix1 to messtab1-msgv1.
            move itab-rintorder to messtab1-msgv2.
            concatenate itab-costele  ' | ' itab-scostctr  ' | '  itab-rcostctr  ' | ' itab-rintorder  into  messtab1-msgv2.
            condense messtab1-msgv2.
            condense messtab1-msgv1.
            append messtab1.
            clear:wa_csks.
           CLEAR:L_TABIX2.
            continue.
          endif.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = itab-rcostctr
    IMPORTING
       OUTPUT        = itab-rcostctr .
          read table it_csks into wa_csks with key kostl = itab-rcostctr.
          if sy-subrc ne 0.
            u_rec = u_rec + 1.
           L_TABIX2 = l_tabix1 + 1.
           move l_tabix2 to messtab1-msgv1.
            move l_tabix1 to messtab1-msgv1.
              concatenate itab-costele ' | ' itab-scostctr  ' | '  itab-rcostctr ' | ' itab-rintorder  into  messtab1-msgv2.
            condense messtab1-msgv2.
            condense messtab1-msgv1.
            append messtab1.
            clear:wa_csks.
           CLEAR:L_TABIX2.
            continue.
          endif.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = itab-costele
    IMPORTING
       OUTPUT        = itab-costele .
          read table it_cska into wa_cska with key kstar = itab-costele.
          if sy-subrc ne 0.
            u_rec = u_rec + 1.
           L_TABIX2 = l_tabix1 + 1.
           move l_tabix2 to messtab1-msgv1.
            move l_tabix1 to messtab1-msgv1.
            concatenate itab-costele ' | ' itab-scostctr  ' | '  itab-rcostctr ' | ' itab-rintorder  into  messtab1-msgv2.
            condense messtab1-msgv2.
            condense messtab1-msgv1.
            append messtab1.
            clear:wa_csks.
           CLEAR:L_TABIX2.
            continue.
          endif.
    move-corresponding itab to itab2.
    MOVE l_tabix1  TO ITAB2-NUM.
    append itab2.
    clear: itab2.
          clear:itab.
        endloop.
      else.
        message 'No records in File'  type 'S'.
      endif.
    ENDFORM.                    " validate_data

  • How to skip first screen in output

    hello,
    just look at standard report RM07MSAL then execute give any values a list comes then press cntrshiftf7 a new list comes.
    i copy this programm into z program here i want c first screen which is come after press cntrshiftf7 means i want first screen skip.
    regards amit.

    if you copied the program already then its yours and you can modify it. fine.
    Create a transaktion for that programm, transaction type 'Program and dynpro'.
    there you have to fill in a starting screen.
    Use your second screen for that purpose.

  • How to skip first records while reading a csv file

    Hi,
    How to skip the first 5 records while reading csv file.
    I have a file which contains first 5 records as dummy records, I want to skip those records and load the rest into RDBMS.
    How to achieve this?
    Thanks,
    Naveen Suram

    Hi Guru,
    Actually I have converted an excel to CSV format, which is generating first 4 rows as some dummy records. 5th row is my header record. But in hearder record, two column names are same. Thats why while reversing it is giving an error.
    With zero in number of columns in header, I am getting the column names as C1, C2...
    If not in reversing, can we reject the first records while loading into RDMBS table using an interface?
    Thanks,
    Naveen Suram

  • How to supress the screen while calling the Fm

    hi all,
    i am using  a FM HRHAP_SHOW_DOUMENT,
    i am passing the ADD_ON_APPLICATION = ALL
    MODE = N
    S_APPRAISAL_ID = my appid(50000081).
    and also start date, end date,T_NEW_APPRAISER,T_NEW_APPRAISEE,
    and when i execute this FM i am getting a new screen,
    but when i call the FM it shud not be displayed,
    is there Fm to supress the screen
    please help me to go ahead.

    Hi rukmani,
    i don't think it is possible to supress the screen by calling any other FM. as all the screens are associated wid the function module. so if u don't want that screen in that case use any other fm for the same purpose.
    regards
    saurabh

  • Submit "and skip first screen"

    hello!
    is there an option for submit-command like "and skip first screen" for call transaction?
    i would like to start a programm without displaying the selection screen (parameters are provided by submit with ...).
    the parameters of the new programm aren't set/get parameters (sap-standard-pgm) therefore call transaction won't work.
    thanks
    matthias

    Hi,
    In ur question itself u have given a solution
    1. Combination of variant and WITH
    DATA: RANGE_LANGU    TYPE RANGE OF SY-LANGU,
          RANGE_LANGU_WA LIKE lINE OF RANGE_LANGU.
    PARAMETERS: MSG_FR LIKE T100-MSGNR,
                MSG_TO LIKE T100-MSGNR.
    MOVE: 'I'  TO RANGE_LANGU_WA-SIGN,
          'BT' TO RANGE_LANGU_WA-OPTION,
          'D'  TO RANGE_LANGU_WA-LOW,
          'I'  TO RANGE_LANGU_WA-HIGH.
    APPEND RANGE_LANGU_WA TO RANGE_LANGU.
    MOVE: 'EQ'  TO RANGE_LANGU_WA-OPTION,
          'E'   TO RANGE_LANGU_WA-LOW.
    APPEND RANGE_LANGU_WA TO RANGE_LANGU.
    <b>SUBMIT REPORT00
           USING SELECTION-SET 'VARIANT1'
           WITH  MSG   BETWEEN MSG_FR AND MSG_TO
           WITH  LANGU IN RANGE_LANGU.</b>
    In REPORT00, all parameters and SELECT-OPTIONS take their values from the variant VARIANT1.Only MSG and LANGU take the values that are explicitly passed.
    Examples
    2. Combination of variant, WITH SELECTION-TABLE, and explicit WITH clauses.
    DATA: SELTAB     TYPE TABLE OF RSPARAMS,
          SELTAB_WA  LIKE LINE OF SELTAB.
    MOVE: 'LANGU'  TO SELTAB_WA-SELNAME,
          'S'      TO SELTAB_WA-KIND,      " SELECT-OPTION
          'I'      TO SELTAB_WA-SIGN,
          'BT'     TO SELTAB_WA-OPTION,
          'D'      TO SELTAB_WA-LOW,
          'I'      TO SELTAB_WA-HIGH.
    APPEND SELTAB_WA TO SELTAB.
    MOVE: 'E'      TO SELTAB_WA-SIGN,
          'EQ'     TO SELTAB_WA-OPTION,
          'F'      TO SELTAB_WA-LOW,
          SPACE    TO SELTAB_WA-HIGH.
    APPEND SELTAB_WA TO SELTAB.
    CLEAR SELTAB_WA.
    MOVE: 'ARBGB' TO SELTAB_WA-SELNAME,
          'P'     TO SELTAB_WA-KIND,      " PARAMETER
          'XX'    TO SELTAB_WA-LOW.
    APPEND SELTAB_WA TO SELTAB.
    <b>SUBMIT REPORT00
           USING SELECTION-SET 'VARIANT1'
           WITH  ARBGB CP 'A*'
           WITH  SELECTION-TABLE SELTAB
           AND RETURN.</b>
    In REPORT00, all parameters and SELECT-OPTIONS take their contents from the variant VARIANT1except LANGU, which takes its contents from SELTAB, and ARBGB, which takes the value that was explicitly passed.
    I got this from ABAP help.
    Hope this helps.
    Thanks & Regards,
    Judith.

  • How to Fill the selection screen while calling the transaction

    Hi All,
             my requirement is in one of the screen while i will press a push button it will call one transaction and it will fill the selection screen build order number field and skip the first screen i.e the selection screen it will show the output of that report directly.
    am using this code .
    case sy-ucomm.
    while 'FSLR'.
    set PARAMETER ID 'ANR' FIELD aufnr.
    RANGES s_aufnr FOR afko-aufnr.
          s_aufnr-sign   = 'I'.
          s_aufnr-option = 'EQ'.
          s_aufnr-low    = aufnr.
          APPEND s_aufnr.
    CALL TRANSACTION 'ZFS1' USING s_aufnr
         MODE 'E' .
        AND SKIP FIRST SCREEN.
    endcase.
    here the problem is i cant use both skip screen and using at a time nither the screen is filling nor its skipping the first screen.
    but its not working would any one please help how can i do this functionality?

    Hi
    Do in this way.
    DATA: rspar TYPE TABLE OF rsparams WITH HEADER LINE.
    rspar-selname = 'S_AUFNR'.
    rspar-kind = 'S'.
    rspar-sign = 'I'.
    rspar-option = 'EQ'.
    rspar-low = 'aufnr'.
    APPEND rspar.
    SUBMIT zfs1_prog  VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar AND RETURN.
    If this doesnt suit yer requirement, I wud suggest you to use BDC as below.
    CALL TRANSACTION 'SE11' USING bdcdata
                           MODE   'E'
                           UPDATE 'A'.

  • Skip first screen of BD87 using call transaction with BDC_DATA option

    hello all,
    i am using call transaction with BDC_DATA option and i want to skip first screen, so can anyone please tell me how can i skip first screen of BD87 and get second screen that is output screen?
    regards.

    Hi
    Build a BDCDATA with following code..
                                                          T     BD87                                                                               
    RBDMON00     1100     X                                                                               
    BDC_CURSOR     SX_DOCNU-LOW
                                                                BDC_OKCODE     =CRET
                                                                SX_DOCNU-LOW                                                                               
    SX_CRETI-LOW     00:00:00
                                                                SX_CRETI-HIGH     00:00:00
                                                                SX_UPDDA-LOW     05.02.2010
                                                                SX_UPDDA-HIGH     05.02.2010
                                                                SX_UPDTI-LOW     00:00:00
                                                                SX_UPDTI-HIGH     00:00:00
    RBDMON00     0100     X                                                                               
    BDC_OKCODE     =BACK
    RBDMON00     1100     X                                                                               
    BDC_OKCODE     /ECBAC
                                                                BDC_CURSOR     SX_DOCNU-LOW

Maybe you are looking for

  • How to send smartform output through mail in PDF Format

    Can some one provide me the sample code Edited by: Revankar Satej on Feb 22, 2008 1:22 PM

  • How can i view time capsule files on another mac

    I am trying to look at files backed up to my Time Capsule.  How do I do that?

  • Apple tv from US in Australia

    I am an American with an American Address but going on assignment in Australia, will my apple tv2/netflix work there?  I have a macbook pro that is unable to access netflix when over there temporarily which works fine back in the states.  any advice?

  • Reprocessing change pointers for MATMAS idoc

    Hi I have a situation where i executed BD21 for changes to materials but no idocs were created due to some issue with the distribution model. Now i have fixed the issue and would like to re process all the materials which were changed. Since i have a

  • Mobileme fonts in Windows Safari

    The calendar in mobileme just displays gibberish for column titles and dialaog boxes. I can't figure out how to fix it. They also are too small and not very readable when you use the HELP in mobileme or Safari. I have Windows 7 64-bit and the current