Form/endform

Hi,
In BW start routine, I want to put the code in a routine such as perform so I can call it repeatedly, passing different value each time as in an ABAP program in ECC.  Can this be done?   For example, I have a function module to get the month/year 1 month ago, 6 month ago, or 10 months ago.  This is the current code:
*to get the month date 3 months ago.
ALL FUNCTION 'ZBW_CALMONTH'
          EXPORTING
            calmonth   = DATA_PACKAGE-calmonth
            backmonths = '2'
          IMPORTING
            smonth     = month_3.
*to get the month date 6 months ago.
ALL FUNCTION 'ZBW_CALMONTH'
          EXPORTING
            calmonth   = DATA_PACKAGE-calmonth
            backmonths = '5'
          IMPORTING
            smonth     = month_6.
I want to do: 
   PERFORM get_month using data_package-calmonth '2'.   " to get the date 3 months ago.
   PERFORM get_month using data_package-calmonth '5'.   " to get the date 6 months ago.
Please advise.
Thank you.

Hi Ravi,
Try this way.
*$*$ begin of global - insert your declaration only below this line  *-*
* TABLES: ...
* DATA:   ...
FORM get_month_3_ago CHANGING lv_month TYPE c(2).
ENDFORM.
FORM get_month_6_ago CHANGING lv_month TYPE c(2).
ENDFORM.
*$*$ end of global -
*$*$ begin of routine - insert your code only below this line        *-*
* fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
* to make monitor entries
LOOP AT data_package INTO w_area.
  if date GT sy-datum.
    PERFORM get_month_3_ago CHANGING w_area-month.
  else.
     PERFORM get_month_6_ago CHANGING w_area-month.
ENDLOOP.
*$*$ end of routine - insert your code only before this line         *-*
If you want this in BW 7.0, you can declare the FORM in
*$*$ begin of 2nd part global
*$*$ end of 2nd part global

Similar Messages

  • How to write Form - Endform in between Function - Endfunction

    Hi Experts,
    I need to write some code in between form & endform in an Include(User-exit)
    This form ---endform doesnot have perform [ Perform is inside a standard Code ] . I tried using Generate pool subroutine. It is also not helping.
    The call for this perform is inside Standard Code.Pls tell how to write Form-Endform between Function -
    Endfunction.
    thanks
    surbhi

    No no no. You're committing after each row! soany
    other session running the same query will see the
    changes you're making. Your session will equallysee
    changes caused by running this query in those
    sessions.Other session, yes, but current session will only see
    the changes once it has completed the current
    statement. Otherwise my "rn" column would not have
    gone up sequentially in the above example. it would
    have gone
    1st row rn = 1 (all rows get updated by 1:-
    2,3,4,5,6,7,8,9,10,11)
    2nd row rn = 3 (all rows get update by 1:-
    3,4,5,6,7,8,9,10,11,12)
    3rd row rn = 5 (all rows get update by 1:-
    4,5,6,7,8,9,10,11,12,13)
    4th row rn = 7 (all rows get update by 1:-
    5,6,7,8,9,10,11,12,13,14)
    5th row rn = 9 (all rows get update by 1:-
    6,7,8,9,10,11,12,13,14,15)
    6th row rn = 11 (all rows get update by 1:-
    7,8,9,10,11,12,13,14,15,16)
    7th row rn = 13 (all rows get update by 1:-
    8,9,10,11,12,13,14,15,16,17)
    8th row rn = 15 (all rows get update by 1:-
    9,10,11,12,13,14,15,16,17,18)
    9th row rn = 17 (all rows get update by 1:-
    10,11,12,13,14,15,16,17,18,19)
    10th row rn = 19 (all rows get update by 1:-
    11,12,13,14,15,16,17,18,19,20)
    So the fact the commit happens each time the rows get
    updated, isn't effecting the currently running select
    statement.
    No, actually you DO see the other session changes. This is because it is AUTONOMOUS transaction, and this a function.
    Test by adding:
    create or replace function incvals return number as
    pragma autonomous_transaction;
    v_val number;
    begin
    update t set rn = rn + 1;
    select max(rn) into v_val from t;
    dbms_lock.sleep(1); --add this line
    commit;
    return v_val;
    end;
    And test in two sessions.
    You will NOT get sequential ascending.
    >
    Think about the effect of two parallel sessionsboth
    running this query at the same time, and ask isthis
    sensible?Gawd, no, of course not. Like I said, I'd never use
    this sort of thing myself. I'm just wondering what
    on earth the OP is trying to achieve.
    :)Glad to hear it.

  • Problem in writing form-endform in Smartform

    Hi,
    I am writing following FORM-ENDFORM in Form routines and Perform in Initialization of global definitions
    in smartforms.
    FORM GET_STD_TEXTS USING V_LANG
    CHANGING
    T_DAMAGE_TRANSIT TYPE STANDARD TABLE OF TLINE.
    DATA:lt_lines LIKE tline OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    id       = 'ST'
    language = V_LANG
    name     = 'Z_DAMAGE_TRANSIT'
    object   = 'TEXT'
    TABLES
    lines    = lt_lines
    EXCEPTIONS
    OTHERS   = 8.
    IF sy-subrc = 0.
    T_DAMAGE_TRANSIT[]  = lt_lines[].
    ENDIF.
    ENDFORM.
    PERFORM GET_STD_TEXTS USING V_LANG
    CHANGING
    G_DAMAGE_TRANSIT.
    In global definitions I have defined :
    G_DAMAGE_TRANSIT TYPE TLINE
    V_LANG TYPE NAST-SPRAS
    <b>But there is something worng. I am getting following error:
    Global Definitions: "OF" has already been declared already</b>

    This solves the problem partially now I don't get any error when I do syntax check for form-endform.
    But still I get error saying G_DAMAGE_TRANSIT is not internal table in PERFORM.
    PERFORM GET_STD_TEXTS TABLES
    G_DAMAGE_TRANSIT
    USING V_LANG.
    In global definitions I haved defined:
    G_DAMAGE_TRANSIT TYPE TLINE.
    Please help....

  • Using FORM ENDFORM in ABAP OO

    Hi,
    I wrote the code like this .I am trying to use FORM which is defined in Report programm,But I am always getting error
    message "Error at parameter 2 ":what change should i do for this. earlier I used the same code  in ABAP ( not ABAP OO) it was working.
    First Programm :
    DATA : l_t_OTIFARR TYPE STANDARD TABLE OF /bic/aYO_SID0100,
                w_table_to_be_read(30) type c.
    w_table_to_be_read = '/bic/aYO_SID0100'.
      perform READ_ODS in program YBW1_OTIF__SI_INCLUDES
        tables SOURCE_PACKAGE
               l_t_OTIFARR
               using w_table_to_be_read.
    ****** REPPORT with FORM Definition
    REPORT  YBW1_OTIF__SI_INCLUDES.
    FORM READ_ODS
         TABLES SOURCE_PACKAGE structure /BIC/CS8YO_IGORD
                l_t_ODS type TABLE
          USING TABLE_TO_BE_READ TYPE C.
      refresh l_t_ODS.
      select * from (TABLE_TO_BE_READ) into table l_t_ODS
         for all entries in SOURCE_PACKAGE
       where /bic/ynv_order = SOURCE_PACKAGE-/bic/ynv_order.
    ENDFORM.
    Titled modified and code tags added by: kishan P on Oct 22, 2010 10:47 AM

    I was wrong about the parameters not working. I didn't spot the TYPE keyword.
    I've tested the idea that it's an OO problem, and still can't see that it is. With the following, I get no problem.
    data : l_t_otifarr type standard table of t100,
                w_table_to_be_read(30) type c.
    data: source_package type standard table of t000.
    *       CLASS tst DEFINITION
    class tst definition.
      public section.
        class-methods: main.
    endclass.                    "tst DEFINITION
    *       CLASS tst IMPLEMENTATION
    class tst implementation.
      method main.
        select * from t100 up to 10 rows into table l_t_otifarr.
        w_table_to_be_read = 'T100'.
        perform read_ods in program ymabitest1
          tables source_package
                 l_t_otifarr
                 using w_table_to_be_read.
      endmethod.                    "main
    endclass.                    "tst IMPLEMENTATION
    start-of-selection.
      tst=>main( ).
    YMABITEST1.
    *&      Form  READ_ODS
    *       text
    *      -->SOURCE_PACKAGE    text
    *      -->L_T_ODS           text
    *      -->TABLE_TO_BE_READ  text
    form read_ods
         tables source_package structure t100
                l_t_ods type table
          using table_to_be_read type c.
    endform.
    Edited by: Matt on Oct 22, 2010 4:57 PM

  • Sap script - using form-endform

    I have used  follwing code in subroutine,but in quality control this is rejected because  of "structure" keyword.
    FORM  GET_TKNUM   TABLES      CT_INTAB  structure   ITCSY
                                                       CT_OUTTAB structure  ITCSY.
      IF CT_INTAB[] IS NOT INITIAL.
       LOOP AT CT_INTAB INTO LV_INTAB.
          READ TABLE CT_INTAB  INDEX 1.
          CHECK SY-SUBRC = 0.
          MOVE ct_INTAB-VALUE TO LV_REQNO.
          CLEAR CT_INTAB.
       ENDLOOP.
      ENDIF.
    Then i used following code but values are not coming from script.
    FORM SHIP_INFO USING CT_INTAB TYPE TABLE ITCSY
                         CT_OUTTAB TYPE TABLE ITCSY.
      IF CT_INTAB[] IS NOT INITIAL.
        LOOP AT CT_INTAB INTO LV_INTAB.
          READ TABLE CT_INTAB INTO LV_INTAB INDEX 1.
          CHECK SY-SUBRC = 0.
          MOVE LV_INTAB-VALUE TO LV_SHIPNO.
          CLEAR LV_INTAB.
        ENDLOOP.
      ENDIF.
    what is another way to define form?

    Try using 'LIKE'.
    LOOP AT CT_INTAB INTO LV_INTAB.
    ENDLOOP.
    FORM GET_TKNUM TABLES CT_INTAB LIKE ITCSY[]
                          CT_OUTTAB LIKE ITCSY[].
      IF CT_INTAB[] IS NOT INITIAL.
        READ TABLE CT_INTAB INDEX 1.
        CHECK SY-SUBRC = 0.
        MOVE CT_INTAB-VALUE TO LV_REQNO.
        CLEAR CT_INTAB.
      ENDIF.
    ENDFORM
    You may also refer to the below sample code  from ABAP HELP. (I could not find a hyper link to it though)
    TYPES: BEGIN OF FLIGHT_STRUC,
             FLCARRID LIKE SFLIGHT-CARRID,
             PRICE    LIKE  SFLIGHT-FLDATE,
           END   OF FLIGHT_STRUC.
    DATA: MY_FLIGHT TYPE TABLE OF FLIGHT_STRUC,
          IBOOK1    TYPE TABLE OF SBOOK,
          IBOOK2    LIKE TABLE OF IBOOK1,
          STRUC     TYPE SBOOK.
    PERFORM DISPLAY USING MY_FLIGHT IBOOK1 IBOOK2 STRUC.
    FORM DISPLAY USING  P_ITAB  LIKE      MY_FLIGHT[]
                        P_BOOK1 LIKE      IBOOK1[]
                        P_BOOK2 LIKE      IBOOK2[]
                        P_STRU  LIKE      STRUC.
      DATA: L_FLIGHT  LIKE LINE OF P_ITAB,
            L_CARRID  LIKE L_FLIGHT-FLCARRID.
      WRITE: / P_STRU-CARRID, P_STRU-CONNID.
      LOOP AT P_ITAB INTO L_FLIGHT WHERE FLCARRID = L_CARRID.
      ENDLOOP.
    ENDFORM.

  • Pass the flag  in form endform.

    I have decleared 2 flags in a type , how to pass these flag in a form  endform

    Hi!
    Somehow like this:
    PERFORM form1 CHANGING flag1 flag2.
    form form1 changing p_flag1 p_flag2.
    MOVE 1 TO p_flag1.
    endform.                    " form1
    Regards
    Tamá

  • Include  form--endform

    i put in include
    form xxxx
    endform.
    and i get error why?
    what should i do?

    I don't think that you can do that,  have an INCLUDE inside of a FORM.  Put the INCLUDE statement at the end of your program outside the FORMS,    you can include your code by wrapping it in a another FORM which is in the INCLUDE.
    FORM XX.
       perform call_alv_grid.
    ENDFORM.
    include YY.
    Now in the include source, have a FORM.
    **include  YY.
    form call_alv_Grid.
    * Do whatever.
    endform.
    Also you can call the FORM directly instead of going thru the FORM XX.
    Make sense?
    Regards,
    Rich Heilman

  • Regarding subroutine (Form-EndForm)

    How do I trigger a Subroutine ( It creates a new ticket/insurance claim number/Invoice number) only when print command is given and not when print preview is given so that un-necessarily new ticket/claim/invoice NUMBERS are not generated?

     Hi,
    So it is a script or the smartform ?
    In the sap script you can call the perform as shown below
    You could make a condition to call the below subroutine in sap script window editor.
    Example:  if sy-ucomm = 'PRINT '.
                      perform  TABLES fp_it_intab STRUCTURE itcsy      
                                            fp_it_outtab STRUCTURE itcsy.
    Endform.
     Please let me know if you want the fuction code for print command.
    Edited by: Ashwin Kumar Chitram on Oct 1, 2011 7:21 AM

  • ABAP Subroutines in SAP Script forms

    Hi Friends,
    Can any give an example on using ABAP Subroutines in SAP Scripts
    how to call ABAP  subroutine IN FORM  and how to define form statement in abap program
    thanks in advance
    Points for sure
    Regards
    Vijaya

    Hi,
    you have to write
    perform formname in program zprogram
    using  &var1&
    using &var2&
    changing &var3&
    endperform
    in se38 create program zprogram of subroutine pool ttype
    and
    write the
    form
    endform there
    egcode for  a subroutne for changing the amount into indian words
    PROGRAM  ZFII_SR_PAYMNT_CHCK.
    declaring the variables which are necessary
    DATA:
      G_AMOUNT       TYPE PC207-BETRG,          " having  amount value
      G_SPELL_AMOUNT(60)  TYPE C, " LIKE     SPELL-WORD,  " amount in words
      G_SPELL_AMOUNT1(60) TYPE C,        " spell structure
      G_WHTAX TYPE BSAK-QBSHB,   "
      G_QBSHB TYPE BSAK-QBSHB, " FOR COLLECTING THE WITH HOLDING TAX
      G_ZUMSK TYPE BSAK-ZUMSK.
    *DECLARING THE INTERNAL TABLES FOR THE OUTPUT TO BE DISPLAYED.
    TYPES : BEGIN OF T_INPUT_TABLE.
            INCLUDE STRUCTURE ITCSY.
    TYPES : END OF T_INPUT_TABLE.
    TYPES : BEGIN OF T_OUTPUT_TABLE.
            INCLUDE STRUCTURE ITCSY.
    TYPES: END OF T_OUTPUT_TABLE.
    DATA: GWA_INPUT_TABLE  TYPE T_INPUT_TABLE.
    DATA: GWA_OUTPUT_TABLE TYPE T_OUTPUT_TABLE.
    DATA: GIT_INPUT_TABLE TYPE STANDARD TABLE OF  T_INPUT_TABLE.
    DATA: GIT_OUTPUT_TABLE TYPE STANDARD  TABLE OF  T_OUTPUT_TABLE.
    TYPES : BEGIN OF T_ITEM,
              BUKRS TYPE BUKRS,
              BELNR TYPE BELNR_D,
              GJAHR TYPE GJAHR,
              WT_WITHCD TYPE WT_WITHCD,
              WT_QBSHB TYPE  WT_WT1,
             END OF T_ITEM,
           IT_T_ITEM TYPE STANDARD TABLE OF T_ITEM.
    DATA :  GIT_ITEM TYPE IT_T_ITEM,
            GWA_ITEM TYPE T_ITEM.
    GET_SPELL_AMOUNT
    FORM GET_SPELL_AMOUNT  TABLES  INPUT STRUCTURE ITCSY
                                   OUTPUT STRUCTURE ITCSY.      "#EC CALLED
    CLEARING OFF THE VARIABLE USED IN PROGRAM.
      CLEAR:  G_AMOUNT,
               G_SPELL_AMOUNT.
    *clearing the internal tables which we have used.
      CLEAR:
       GIT_INPUT_TABLE,
       GIT_OUTPUT_TABLE.
    *REFRESHING THE INTERNAL TABLES.
      REFRESH:
       GIT_INPUT_TABLE,
       GIT_OUTPUT_TABLE.
    *initially assigning the memory vaules to our internal tables.
      GIT_INPUT_TABLE[]  = INPUT[].
      GIT_OUTPUT_TABLE[] = OUTPUT[].
    *reading the table input to get the amount value.
      READ TABLE GIT_INPUT_TABLE INTO GWA_INPUT_TABLE   INDEX 1.
      IF GWA_INPUT_TABLE-VALUE CA 'X'.
        REPLACE ALL OCCURRENCES OF 'X' IN GWA_INPUT_TABLE-VALUE WITH '0'.
      ENDIF.
    *THIS IS IMPORTANT PART AS IT IS CONVERTING THE
    *CHARACTER FIELD INTO CURRENCY FIELD.
      SHIFT GWA_INPUT_TABLE-VALUE LEFT DELETING LEADING SPACE.
      TRANSLATE GWA_INPUT_TABLE-VALUE USING ', '.
      CONDENSE GWA_INPUT_TABLE-VALUE NO-GAPS.
      G_AMOUNT = GWA_INPUT_TABLE-VALUE.
    *calling the function moudle which will
    *covert amount into words (indian format ).
    *i.e in crores, lakhs, thousands
      DATA: L_SPELLAMOUNT(255) TYPE C,
            L_ONLY(255) TYPE C.
      CLEAR: L_SPELLAMOUNT, L_ONLY.
    *here the amount should not be more than
    99,99,99,999.99 . if it is greater than
    *this amount this function module will not work
    *so give the amount which is lessthan or equal to
    *above said amount.
      IF G_AMOUNT LT '1000000000'.
        CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
          EXPORTING
            AMT_IN_NUM         = G_AMOUNT
          IMPORTING
            AMT_IN_WORDS       = L_SPELLAMOUNT
          EXCEPTIONS
            DATA_TYPE_MISMATCH = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      CONDENSE L_SPELLAMOUNT.
      TRANSLATE L_SPELLAMOUNT TO UPPER CASE.
      CONCATENATE L_SPELLAMOUNT 'ONLY' INTO L_ONLY SEPARATED BY SPACE.
    *moivng the field name into table field.
      GWA_OUTPUT_TABLE-NAME = 'G_SPELL_AMOUNT'.
    *assigning the amount in words to the variable.
    *the reason  behind splitting the word into two parts
    *is--- in the scripts the whole string is not getting
    *printed. So we are splitting it into two parts so that
    *it will print the whole string.
      G_SPELL_AMOUNT = L_ONLY+0(60).
      G_SPELL_AMOUNT1 = L_ONLY+60(60).
    G_SPELL_AMOUNT  = L_SPELLAMOUNT.
    *MOVING THE AMOUNT IN WORDS TO FINAL WORK AREA.
      MOVE G_SPELL_AMOUNT TO GWA_OUTPUT_TABLE-VALUE.
    *MODIFYING THE INTERNAL TABLE FORM THE WORK AREA.
      MODIFY  GIT_OUTPUT_TABLE FROM GWA_OUTPUT_TABLE INDEX 1.
    *FOR THE SECOND RECORD I.E FOR THE NEXT 60characters
      GWA_OUTPUT_TABLE-NAME = 'G_SPELL_AMOUNT1'.
      MOVE G_SPELL_AMOUNT1 TO GWA_OUTPUT_TABLE-VALUE.
      MODIFY  GIT_OUTPUT_TABLE FROM GWA_OUTPUT_TABLE INDEX 2.
    *assigning the total output table to the memory .
      OUTPUT[] =  GIT_OUTPUT_TABLE[].
    ENDFORM.                    "GET_COMPADDR
    thanks & regards,
    Venkatesh

  • Form routine problem

    what is the exact use of the form routine assigned in nace?
    eg:
    o/p type                                     script drv prog   form routine  formname
    NEU        (Purchase order)     SAPFM06P     ENTRY_NEU     MEDRUCK
    if i create any modifications in the form routine using itcsy then will i have to write all the code within this form routine?
    eg:
    perform <form routine name> in program zprog1.
    using
    changing
    endperform.
    i have searched sdn but cudnt find a suitable answer. pls explain with an example.

    Hi,
    The routine mentioned in the Nace will have the logic to Get the data required to ptint on the form and also it call the Form using the function modules lije Open_Form Start_form Write_form. If it is a smartform it calls the Smart form generated FM.
    Ex NACE--> ENTRY_NEU
    Driver Program in NACE is ZSAPFM06P
    This prgram contains the form  ENTRY_NEU
    Form ENTRY_NEU.
    *get the data
    *Call the form
    Endform.
    I hope it is clear.

  • Form and Function Module

    Is there a way to put a form endform block into the definition of a function module?
    tnx
    Gabriele

    Hi Gabriele,
    I dont think so. I have seen  people adding the FORM.... ENDFORM after ENDFUNCTION statement.
    But within the FUNCTION.......... ENDFUNCTION i dont think it is possible.
    Regards,
    Prakash Pandey

  • In SAP Scripts MAIN procesed first?

    Hi Experts,
    I hv a small doubts in SAP Scripts, they r,
    1- In SAP Scripts the MAIN window is procesed very first all over the SAP Script?
    2- To debug the script, after activating the debugger in Script, Shall I go & debug the Print prog step by step or just run the Transaction, e.g.
    say ME23?
    ThanQ.

    Hi Srinivas,
       The order in which the windows are triggered is determined by the print program.
    The print program will call the WRITE_FORM function modules which will trigger the windiw that is passed to it.
    You can see the example print program:
    RSTXEXP1
    The fm WRITE_FORM is called multiple times, and different windows get triggered as and when the control comes to the Function module.
    And regarding your second question, in general you cannot run the print programs as stand alone(most cases) as the would not have and executable code outside the form-endform .So, to test the script, you must run the transaction after your activate the script debugging.
    Regards,
    Ravi

  • Printing Line Items in Script without using driver program

    How to print the line items of a internal table in sap script without using driver program? I am not supposed to edit anything in the driver program. Pls help me to solve this problem...

    Hi,
    You can try by creating a new driver program and a new FORM ENDFORM inside that for this purpose.
    Regards,
    Gaurav

  • Refresh in alv report

    hi masters,
    i m working on alv report where i have to change the data. after changing the data i have to do the refresh for that i m using the method below
    wa_STBL-ROW = 'X'.
    wa_STBL-COL = 'X'.
    CALL METHOD grid_obj->refresh_table_display
        EXPORTING
             IS_STABLE      = wa_stbl
              I_SOFT_REFRESH = 'X '
    EXCEPTIONS
    finished = 1
    OTHERS = 2.
    but after executing this method its giving run time error saying that ' Access via 'NULL' object reference not possible.  You attempted to use a 'NULL' object reference (points to 'nothing') access a component (variable: "GRID_OBJ").'. can u plz help me where i m going wrong. and how to implement the refresh in alv report in details..
    thanks in advance.
    regards,
    vicky

    hi,
    when i clicked on refresh button it is going to pf-status after that as i shown in below code it goes to refresh_report. but in this 'form refresh_report'  it won't display the data. it goes into the infinite loop. within that form- endform. plz can u give me solution for this problem?
    set pf-status 'STANDARD_FULLSCREEN'.
      case sy-ucomm.
        when '&REFRESH'.
    perform refresh_report.
    endcase.
    form refresh_report .
      perform build_fieldcatlog.
      perform event_call.
      perform populate_event.
      perform data_retrieval.
      perform build_listheader using it_listheader.
      perform display_alv_report_fm.
    endform.                    " REFRESH_REPORT

  • Skip first screen and return using BDC

    Hi,
    I am calling a Transaction from an ALV REPORT ,i wanted to set the material number in that transaction, i checked using f1 help and found the parameter id as 'MAT' .
    But when i am calling the transaction,the material number is not being displayed,Hence i modified the code below..
    My Previous code:
    READ TABLE alv_stb INDEX i_selfield-tabindex.
    IF sy-subrc = 0.
    SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
    CALL TRANSACTION 'TCODE' .
    ENDIF.
    My CURRENT CODE :
               PERFORM bdc_dynpro      USING 'XXX_/2L3_BOM_XX'
                                                   '1000'.
                PERFORM bdc_field       USING 'BDC_CURSOR'
                                                   'PA_MATNR'.
                PERFORM bdc_field       USING 'BDC_OKCODE'
                                               '=ONLI'.
                PERFORM bdc_field       USING 'PA_MATNR'
                                                   alv_stb-idnrk.
                PERFORM bdc_field       USING 'PA_STLAN'
                                                   alv_stb-xtlan .
                CALL TRANSACTION 'TCODE '
                                        USING bdcdata
                                        MODE 'E'
                                        UPDATE 'S' .
    Requirement :
    I need to skip the first screen ,This is working ( screen is skiped) Now when i want to come back from the Transaction to my alv report,by pressing back button..this first screen which i skipped is being displayed, which i dont need...how to skip that screen,when pressing F3 from transaction or back button.

    hi shafiq
    *&      Form  zf_user_command
          text
    -->  p1        text
    <--  p2        text
    FORM ZF_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                                      RS_SELFIELD TYPE SLIS_SELFIELD .
        CASE R_UCOMM. "FCODE
    WHEN '&IC1'.   "for hotspot with MATNR.
          IF RS_SELFIELD-FIELDNAME = 'MATNR'.
          SET PARAMETER ID 'MAT' FIELD RS_SELFIELD-VALUE.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
          RETURN.
            MESSAGE I103 WITH RS_SELFIELD-VALUE .
          ENDIF.
    message - material no 'X' shown succesfully
      ENDCASE.
    ENDFORM.                    " zf_user_command
    if it's not taking code..
    delete form..endform..and call it again it might be giving a problem with the old form endform... just try if nothing else works
    the above given logic is fine and working
    reward poitns if helpful
    Rohan

Maybe you are looking for

  • Trying to open Adobe Bridge from Photoshop CC 2014 will launch Creative Cloud

    As written in the subject, I have the problem that Bridge doesn't start anymore since updating to Photoshop CC 2014. Instead the creative Cloud desktop application is launched and tries to reinstall Bridge CC (although it is already installed) All ol

  • My iPod touch 5th gen can't play videos?

    I've had my iPod touch 5th gen since Christmas Eve and I haven't had any problems with it, but a few days ago it stopped playing videos and now - even though I have turned it off and back on and turned the wifi off and back on again - it still can't

  • Message IDs in BPM

    Hi, Following are the steps in BPM 1. XI receives the Delivery IDOC from SAP ( converts to XML ) - Creates XI MSG ID 1 2. XI Sends the XML to other system using Web Service - Creates XI MSG ID 2 I'm writing a FM which will have IDOC# as the input and

  • RERAPP and reference field

    Hi, does anyone know how SAP determines the Reference field (XBLNR) when generating vendor open items via Periodic posting run RERAPP? Is there any possibility to define a certain reference by the user? Thanks, Sonja

  • My photoshop Elements 12 has stopped working, help!

    I am urgent need of asistence, I have recently bought the full version of Photoshop Elements 12 and it has ubruptly stopped working. The software has been working perfectly up untill this point. On opening the package either from the start or through