Is it possible to copy one Programs Screen to Function module ??

As you know it's common to copy one programs screen to another but my requirement  is coping one screen in a program to function module
i didn't find any option for it , is there a solution for it ?

Hi Mohammad,
You can't create or copy a screen to function module....
But you can do this in a function group, so that it available for all function modules...
Note : While copying to function group , Target program name = SAPLZFUNCTION_GROUP
Regards
Sreekanth

Similar Messages

  • Call screen in Function Module

    Hi all,
    I want to call a Screen in function module.Is it possible?
    If possible.How can I do that?
    I tried calling a screen from a function module but the PAI module is not getting accessed.
    I am able to see the screen but when I click on the push button the cursor is not entering the PAI.
    I maintained the FCT codes for the push buttons...dont suggest me to do that.
    If anybody know it, please help me.
    Thanks in advance...................
    regards,
    vinil.
    Edited by: vinil kumar aturi on Jul 1, 2009 4:40 PM

    It is possible, not really different than calling from a program. After creating screen from SE80 tcode look at the screen and PBO, PAI blocks.
    If your function module generate a popup screen you must create your gui status in dialog box type. You can also check code in popup_to_confirm fm to make it clear.

  • How to copy a generic extractor with function module into a new system?

    Dear Gurus,
    i would like to know how i can copy a gneric datasource with function module from one system to the target system.
    Thank you
    Cheers

    Hi Anesh,
    thank you for replying.
    Since the Datasource will have a new new in the new system, i will create a new one.
    Create a generic datasource base on the table is not the problem.
    My problem is how could i copy the FM in the new system?
    If you can help me on that, it will be fine.
    Thanks

  • ALV Grid Traffic control Example  program implemented with function modules

    Hi Friends,
    Can any one please give me ALV Grid control traffic lights  example program implented using function modules instead of OOP ALV. It is very urgent,
    Thanks in advance,
    Santosh Kumar.

    Hi Santosh ,
    Here is a sampla code for the same
    TYPE-POOLS : SLIS.
    DATA : BEGIN OF IT_1 OCCURS 0 ,
               MATNR TYPE matnr ,
               FLAG TYPE C ,  " added for the traffic control
           END OF IT_1.
    SELECT MATNR INTO TABLE IT_1 " Select Data
    UP TO 10 ROWS
    FROM MARA.
    DATA : CATALOG TYPE SLIS_T_FIELDCAT_ALV ,
           WA_CATALOG TYPE SLIS_FIELDCAT_ALV ,
           LAYOUT TYPE SLIS_LAYOUT_ALV .
    *" create catalog
    WA_CATALOG-FIELDNAME = 'FLAG'.
    WA_CATALOG-TABNAME = 'IT_1'.
    APPEND WA_CATALOG TO CATALOG.
    WA_CATALOG-FIELDNAME = 'MATNR'.
    WA_CATALOG-TABNAME = 'IT_1'.
    APPEND WA_CATALOG TO CATALOG.
    DATA : FLAG_T TYPE I.
    *"assign value to traffic signal
    LOOP AT IT_1.
    FLAG_T = SY-TABIX MOD 2.
    IF FLAG_T = 0.
    IT_1-FLAG = '1'.
    ELSE.
    IT_1-FLAG = '2'.
    ENDIF.
    MODIFY IT_1.
    ENDLOOP.
    *"specify the traffic signal field in the layout
    LAYOUT-LIGHTS_FIELDNAME = 'FLAG'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                =
    *   I_BUFFER_ACTIVE                   = ' '
    *   I_CALLBACK_PROGRAM                = ' '
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                         = LAYOUT
       IT_FIELDCAT                       = CATALOG
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_ADD_FIELDCAT                   =
    *   IT_HYPERLINK                      =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    *   IT_EXCEPT_QINFO                   =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_1
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    so rem all you need to do is add a feild in internal table for the traffic signal , assign values 0 , 1, 2 to it and last specify the name of this feild in the layout.
    Regards
    Arun

  • Copying Enchancement spots from standard function module to Z fun module

    Hi All,
    I copied standard function module SD_BACKORDER_LIST to my Z function module . But i am unable to copy the enchancement spots available in the standard function module . please give me the suggestion to copy this to my Z function module .
    Regards
    R.Vijayakumar

    Hi Martin,
    A SAP note will soon be released about this (compatible back to 6.40)
    There is a light version available in 7.3 to transfer data between PFCG and ST01.
    There is an optional Rolls-Royce version available for Z-codes / functions and the import parameter specific checks. The trick is to keep the original context of the call and maintain the proposals to the RFC enabled entry point, and know whether the tcode triggered it or the external caller.
    There is a service delivered which is context sensitive (e.g. the message type of the IDOC determines the application authorizations needed for synchronous processing, so SAP cannot deliver SU24 reliable proposals and the ones they tried for the /SDF/ are very isolated..).
    You need a "common functions" role for the basic scenarios like you have for interactive SAPGUI end-users, and then you need a runtime analyzer to perfect SU24 context sensitively. You also need to distinguish between a local BAPI (context is tcode) and remote one (context is RFC protocol, or http protocol... etc)
    That comes with the SAP Note...  (it is not released yet. I will update this with the number in the next weeks.)
    --> Just a little heads-up and insight that there is some light at the end of the tunnel and you can even order it as a service from SAP to fix your Z-problems for you. The question happened to match that which I know SAP is working on.
    Cheers,
    Julius
    Disclaimer : I have done many such spagetti fixes in the wild and developed the tool and services for customer scenarios together with SAP from my experiences, it is one of my favourite topics --> the Rolls-Royce version with Z-functions, hard-wired external RFC clients and configuration scenario dependent checks includes consulting fees if you want SAP to secure your own scenarios for you. The tools help this, but you cannot fully automate or propose it fro SU24 in "factory settings".

  • How to create Inbound Idocs in a ABAP program? Any function Module?

    Hello Experts,
    My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
    I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
    If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
    I populated T_EDIDD with data records from  IDOC_INBOUND_WRITE_TO_DB.
    To the function module IDOC_INPUT_ORDERS,  T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
    I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
    I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
    Can anybody please provide inputs?
    Regards.

    Hi Anjali,
    Thanks for the response.
    I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
    for compatibility: clear administration data of data records
               perform data_records_wipe
                                      tables
                                          t_data_records.
    FORM DATA_RECORDS_WIPE
                      TABLES
                          T_DATA_RECORDS_IN  STRUCTURE EDIDD.
      LOOP AT  T_DATA_RECORDS_IN.
        CLEAR: T_DATA_RECORDS_IN-MANDT,
               T_DATA_RECORDS_IN-DOCNUM,
               T_DATA_RECORDS_IN-SEGNUM,
               T_DATA_RECORDS_IN-PSGNUM,
               T_DATA_RECORDS_IN-HLEVEL.
        modify t_data_records_in.
      ENDLOOP.
    ENDFORM.                               " DATA_RECORDS_WIPE
    This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
    I need to create INBOUND Idocs with the data in ABAP program.
    Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
    Regards

  • ABAP Programing help regarding function modules coding

    Hi,
    i'm currently creating a function module that retrieve a number from a table and add one to it and return back the value to the table.
    the codes are as follow:
    FUNCTION ZFM_NUMBER
    " * " Local Interface:
    " EXPORTING
    "      VALUE (ZZNUMBER) TYPE ZNUMBER
    "      VALUE (ZENUMBER) TYPE ZNUMBER
    SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
    END SELECT.
    ZENUMBER = ZZNUMBER + 1.
    UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
    END FUNCTION.
    this function module works finely, but now i need to concatenate the number with the year to store it into another table.
    i know something about the sysdatum where i select only the first 4 characters...but i'm not sure how could i do that?
    do i need to create another function module to call the above function module and concatenate it with the year?
    or i just need to continue the codes in the same function module?
    and how should i code it?
    i'm very new to abap coding and i could'nt get help from anyone in my team. your help is very much appreciated!!!
    Thanks,
    leesyy

    hi you can do it in the same function module.
    SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
    END SELECT.
    instead of the above statement use the following statement, it improves performance of your program
    SELECT single ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
    in the above statement you can also specify some where condition
    ZENUMBER = ZZNUMBER + 1.
    UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
    data: var_date type sy-datum,
          var_yyyy(4) type c,
          var_numyear(10) type c.                   
    var_date = sy-datum.
    var_yyyy = var_date+0(4).
    concatenate ZENUMBER var_yyyy into var_numyear.
    UPDATE ZTAB_NUMyear SET ZNUMyear = var_numyear WHERE ZNUMBER = ZZNUMBER.
    Regards
    Sajid
    Edited by: shaik sajid on Jan 14, 2010 5:08 AM
    Edited by: shaik sajid on Jan 14, 2010 5:09 AM

  • Is it possible to circumvent error message within a function module?

    Hello friends,
    Is it possible to circumvent error message generation from within a function module? My program calls a FM (namely FKK_S_CADOCUMENT_WRITEOFF) to do some updates. However, in certain cases this FM throws error messages and terminates the whole process. I cannot control the aftermath because it never gets back to the calling program.It stops at the FM level and not at my program level.
    In essence, what I would like to do is to let the FM do its thing, generate some kind of exception (but no error message), come back to the calling program, and then I can capture the status in my program and do what is necessary from then on.
    Your help is greatly appreciated

    Hi,
    Do not use Excerption Tab.
    Instead declare a variable or Structure at export parameter.
    Which will return you error Description or Status of the FM.
    For Example.
    Goto Se37 ---> key in FM name of yours.
    Go to Table tab
    At Parameter Name Column key in RETURN, Type as LIKE and Associate type as BAPIRET2.
    ThankS & regards,
    ShreeMohan
    Edited by: ShreeMohan Pugalia on Aug 10, 2009 12:31 PM

  • Can any one suggest me a function module or BAPI for the below requirement.

    Hi all,
    I have a requirement in which i need to send an IDoc for each item of  the delivery document linked to the shipment document.
    previously i have called the function module in a BADI, but now the requirement has changed.No BADI or USEREXIT has to be used.Instead i need to create a custom program and call the function module in a form in the program.My doubt is how can i get the tables needed in the function module from the program? previously i got the tables as online parameters in the BADI.
    the function module will be trigerred at the time of saving of the document.
    I understand that i need to pass the tables in the program, but is there any way (function module or a BAPI) that can be used to directly get the data of the BADI?
    please help me as soon as possible.

    hi,
    my transaction is VL02N change outbound delivery.

  • BDC program or standard function module to change data in PFCG TCode.

    Gurus,
    I have programatically change the validity date of SAP security role (TCode PFCG). Are there any standard function module available for this ? If not then does PFCG supports update vida BDC programming ?
    Regards,
    Rajesh.

    Cross-posting. Thread locked.
    Please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement].
    PS: Please clean up / follow up on all your hundreds of unresolved questions.

  • How to use selection-screen in function module?

    Hello
    I've created a function module and i have to create within the function module a selection-screen(with select-options for entering data) but i get an error that within form routines and function modules this statement is not allowed.
    Can anybody help?
    thanx

    Hi,
       YOu cannot create a selection screen withing a function module.
    What you can do is to call a screen , say '0100'.
    Create a screen '0100' and then include a selection -screen as a subscreen in that screen.
    Regards,
    Ravi

  • Call an ABAP program or a function module from command prompt/python script

    Dear All,
    I want to call a function module/ABAP program from command prompt or a python script.
    Let me explain with an example.
    There is a function module "z_add" that takes  two integers as input parameters and generates their sum.
    the sum is the output parameter.
    Now i want to call this function module from command prompt / python script and pass parameters to this function module.
    In return i must get the sum(i.e. the output of function module).
    I tried using STARTRFC ,was able to call the FM but could not get the return value(output) from FM.
    Can you please provide me the code of such a function module and the method to call it thereby passing parameters and getting the sum.
    Thanks and regards,
    Gaurav
    Edited by: gauravkec2005 on Mar 4, 2010 7:41 AM

    thank you both!  helpful answers! :o)
    anyway! 
    i have written the program which is called from the SAPScript:
        /:       PERFORM GET_VATNUMBER IN PROGRAM ZFI_F140_OPERATIONS
        /:       USING &BKPF-BUKRS&
        /:       CHANGING &VATNUMBER&
        CE       VAT Registration No : &VATNUMBER&
        REPORT zfi_f140_operations.
        FORM get_vatnumber TABLES in_par  STRUCTURE itcsy
                                  out_par STRUCTURE itcsy.
          DATA: lv_co_code TYPE bukrs,
                lv_vat_no  TYPE stceg.
          READ TABLE in_par WITH KEY name = 'BKPF-BUKRS'.
          MOVE in_par-value TO lv_co_code.
          SELECT SINGLE stceg FROM t001
            INTO lv_vat_no WHERE bukrs = lv_co_code.
          out_par-name = 'VATNUMBER'.
          WRITE lv_vat_no TO out_par-value.
          CONDENSE out_par-value.
          MODIFY out_par INDEX 1.
        ENDFORM.              
    it is not working and i cannot work out why... 
    i have not been ABAPing for very long but have had a go.... 
    any thoughts as to what i have done wrong?
    or point me where i should be looking?  thank you!

  • Is it possible to copy one whole page from one photo-book to another?

    I often want to re-use the same page that I have made in one photo-book, in a new photobook, but I cannot find out of how to copy the whole page. Is it possible?

    No, you can't.  Send a feature request to Apple via http://www.apple.com/feedback/iphoto.html.
    OT

  • Modify code in include program of smartform function module

    Hi,
               Someone hardcoded breakpoint inside the smartform function code.
    I have to delete that breakpoint.But its asking access key.
    Can't we remove that line in any other way?.
    Thanks,
    Sri

    Hi,
    You can remove it from the smartform instead of trying in the smartform include program.
    Thanks
    Arul

  • Run time error due to custom function module in a program

    Hi,
    I  have created one program using custom function module ZIN_COMEV_CUSTDETAILNOTIF_OUT .The program is showing runtime error
    "Incorrect parameter with CALL FUNCTION."
    I have tested the FM using same set of parameter as in program it is working.It is throwing error while executing in program help.
    Regards
    Datta

    Hello Nagraj or harish
    I think you may be right.There is date  field in my function module ,when I am testing function module I am giving it as
    Y_DATE = 01.01.2011,but in program the field is DATS type and I have to give 20110101.If this is the problem how I can solve it.
    CALL FUNCTION 'ZIN_COMEV_CUSTDETAILNOTIF_OUT'
      EXPORTING
        Y_SENDER              = gv_g_sender
        Y_RECEIVER            = gv_g_reciever
        Y_PARTNER             = GV_V_PARTNER
        Y_BASIC_PROCESS       = GC_BASIC_PROCESS
      Y_SWITCHNUM           =
      Y_SEN_LOAD            =
        Y_INTUI               = GV_V_INTUI
      Y_TRANSACTIONID       =
        Y_DATE                = GV_V_DATE

Maybe you are looking for

  • I can't get texts from android phones on my new 5c

    We just switched from Sprint to Verizon.  My daughter can send texts to android phones but can't receive them.

  • I can't use wi-fi and internet, why?

    I was given a phone BlackBarry 9780. But I can't use wi-fi and internet (I have them turned on, but it's useless). Could anybody explain me why is this situation?

  • Restore previous version excel file

    I safed a excel file with the same name of an already existing file. Can I, and if so how, retrieve this original file?

  • Handling java.lang.OutOfMemoryError

    Hi all, I've got these huge text files (approx 23MB in size) for which I am writing a simple text parsing program. I'm using a BufferedReader to read information in line by line. BufferedReader rdr = new BufferedReader(new FileReader(myBigFile));Even

  • Overall Release of PR

    Hi all, I have configured release procedure for PR. I have created 2 classes for PR. One for item-by-item release and another for overall release. I have assigned different release groups to both. I have also checked 'OvRelPReq' indicator for the rel