Function modules to edit table's record

Hi, thanks in advance. I have two questions:
1. I call function 'STC1_FULLSCREEN_TABLE_CONTROL' to edit a table, the problem is fieldnames are not displayed, all emptys. Please check below calling.
CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
       EXPORTING
            HEADER = p_table
            tabname = p_table
            endless = 'X'
            no_button = space
       IMPORTING
            okcode = w_okcode
       TABLES
             nametab = it_dfies
             TABLE = <itab>
             fielddif = it_fdiff
             modif_table = <ntab>
       EXCEPTIONS
             OTHERS = 1.
2. The second question is above function module is to edit a table in full screen style, multiple record lines are displayed. Could you please tell me which function module can be called to only edit one record in the screen?
Thanks.
Tom

Hello Tom
Use the following code before calling the function.
loop at IT_DFIES into is_dfies.
    if is_dfies-reptext is initial.
      select single scrtext_s into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                 and fieldname = is_dfies-fieldname
                                                                 and ddlanguage = sy-langu.
      IF sy-subrc = 0 and is_dfies-reptext is initial.
        select single scrtext_m into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                   and fieldname = is_dfies-fieldname
                                                                   and ddlanguage = sy-langu.
        IF sy-subrc = 0 and is_dfies-reptext is initial.
          select single scrtext_l into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                     and fieldname = is_dfies-fieldname
                                                                     and ddlanguage = sy-langu.
        endif.
      endif.
      If is_dfies-reptext is initial.
        select single fieldtext into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                   and fieldname = is_dfies-fieldname
                                                                   and ddlanguage = sy-langu.
      ENDIF.
      If is_dfies-reptext is initial.
        is_dfies-reptext = is_dfies-fieldname.
      ENDIF.
      modify it_dfies from is_dfies .
    endif.
  endloop.
I hope that could help
Regards
dstj

Similar Messages

  • Function module for finding number of records in table

    Do we have any function module to find number of records in a table?
    Thanks,
    Shweta

    use the EM_GET_NUMBER_OF_ENTRIES. You just have to write your table name into the input table IT_TABLES in the TABNAME field

  • Crystal Reports Based on SAP Function Module and Transperant Tables

    Hi,
    I need to develop reports based on SAP trasperant tables and to filter the records I require to use one of the function module in SAP.
    I have created parameters in Crystal reports that are required for the function to execute and are included in the where clause of the query. This helped the fuction to get those parameters and execute it.
    The thing is that the fuction works fine with one set of parameters and gives accurate results both in SAP and Crystal Reports.
    But fails for other set of parameters.
    It works fine when we directly execute function in SAP produces a record set. But, when we pass those parameters from Crystal Reports it fetches no data.
    Can anybody tell me the exact procedure to use function module and transperent tables together in Crystal Reports ?
    Thanks in Advance.
    Niwas Joshi

    Hi,
    This is going to be hard to explain, however you need to recognize that the function has input and possibly output (export) parameters.  Crystal Reports is able to work with these parameters.  However it is up to you to figure out how these parameters are used effectively to give you the correct results when joining the function with other data sources such as transparent tables.
    If you're using transparent tables and functions in a Crystal Report, then you need to link these objects in such a way so that a left outer join for example is using the function's output parameters to join to the transparent table equivalent fields.  However if the table is the starting point then the joins from the table should join the Input parameters of your function.
    you can set these joins in the Database menu | Database Expert | Links of Crystal Reports.

  • How to create ENQUEUE function module for s567 table

    Hi Experts,
    Anyone Plz tell the steps how to create a ENQUEUE function module for the table s567.
    Its somewht urgent, plz help me.
    <REMOVED BY MODERATOR>
    Mohana
    Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:21 PM

    Hi,
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    Hope this will give a basic idea.
    Regards
    Sudheer

  • Function Module to edit the ALV Output

    Hi,
      I have an ALV report output.I need the edit values based on some conditions in the ALV output and 
      save the changes. Is there any function module to edit the output and proceed further.
      Thanks in advance.
    Regards,
    Navas

    First create the field catalog of the field that you want to edit in this way
    WA_fieldcat-fieldname  = 'MENGE'.
      WA_fieldcat-qfieldname = 'MEINS'.
      WA_fieldcat-seltext_m  = 'PO Quan.'
      WA_fieldcat-edit = 'X' .
    Secondly you keep a custom button like 'SAVE' in the toolbar and  also try to keep a checkbox in your ALV.
    for checkbox you have to keep a following code snippet in your finallly displayed interanal table:
    chk(1)    TYPE c, and in the fieldcatalog you have to write following piece of code
      WA_fieldcat-fieldname = 'CHK'.
      WA_fieldcat-seltext_m = 'CheckBox'.
      WA_fieldcat-checkbox = 'X'.
      WA_fieldcat-edit = 'X' .
      WA_fieldcat-input = 'X'.
      WA_fieldcat-tabname = 'IT_FINAL'.
      WA_fieldcat-col_pos = 1.
    then you have to set the parameter i_callback_user_command           = 'USER_COMMAND'
    of FM REUSE_ALV_GRID_DISPLAY.
    Then write a subroutine like the following one to handle the SAVE operation
    FORM user_command USING I_r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    DATA:l_cntr TYPE i.
    CASE I_r_ucomm.
    WHEN '&ZXZ'.
          CLEAR l_cntr.
          CLEAR WA_final.
          LOOP AT IT_final INTO WA_final.
            IF WA_final-chk = 'X'.
              l_cntr = l_cntr + 1.
            ENDIF.
          ENDLOOP.
          IF l_cntr GT 1.
            MESSAGE i011.
          ELSEIF l_cntr = 1.
               READ TABLE IT_final INTO WA_final WITH KEY chk = 'X'.
               MODIFY IT_final FROM WA_final TRANSPORTING menge
              WHERE chk = 'X'.
              CLEAR WA_final.
              PERFORM disp_alv. <<<This is to display the refreshed alv after saving your data
         endif.
    ENDCASE.
    ENDFORM.

  • Function module to get table description

    Is there any function module to get table description on passing table name

    Hi,
    We need to use : 'G_RW_TABLE_DESCRIPTION_GET' function module.
    we pass the table name and the language.
    call function 'G_RW_TABLE_DESCRIPTION_GET'
        exporting
          rw_table = p_table
          langu    = sy-langu
        importing
          tab_text = l_tabtext
        exceptions
          others   = 1.
    thanx.

  • Attach function module to a table field

    Hi guys,
            I need to add a function module to a table field as a F4 help.
    The function module i like to attach is K_GROUP_SELECT.
    Like it works in the transaction KS13
    Function module-->   ‘K_GROUP_SELECT’
    Please reply urgent will be rewarded with full points.

    Use the TCode SE11  & create a <b>search help</b> for the Table field in question.
    ~Suresh

  • How to find the function module for standard tables.

    Hi
    Could any one please tell me how to find the standard function module to update the standard tables
    Thanks & Regards
    Sowmya

    Hi sowmya,
    To find the function modules for standard tables you go for a where used list of that particular table and check only function module interfaces checkbox...
    and more over you can go for DB_UPDATE_TABLE will be the function module for updating database table..
    Hope this information would help you
    Regards
    Narin Nandivada

  • Function Module to Edit Billing Document Header (table VBRK)

    Hi all,
    Can someone tell me if there is a function module that can edit the billing document header please?  I do not need to created the billing document, it already exists.  I just need to edit specific fields.
    Many thanks.

    The requirement is to update these 2 fields in the table VBRK:
    BSTNK_VF (customer po number)
    ZUONR (assignment number)
    The client uses these 2 fields for non-standard purposes.
    Actually I was already trying to use the FM RV_INVOICE_DOCUMENT_UPDATE, but I am unable to make it work, for some reason. 
    For that function, I only passed VBRK as table, nothing else.  Specifically, I retrieved the header from VBRK, modify the 2 fields, then pass it to the VBRK table parameter of the function.

  • Function module for VBFA table

    Hi Gurus,
    Please Help me on this Issue..
    I want to retrieve data from vbfa table..while making query to retrieve data from vbfa tabl,its making performance issue on production server.
        SELECT vbelv
               vbeln
                    INTO TABLE i_ref_data
        FROM vbfa FOR ALL ENTRIES IN i_billing_main
        WHERE
             vbelv   EQ i_billing_main-vbeln AND
             vbtyp_n EQ c_vbtyp_n.
    so i have tried to retrieve data using functiom module "RV_ORDER_FLOW_INFORMATION" .in this function i was not able to pass multiple document no to this function module so put this function module inside the loop but this option also making performance issue..
    LOOP AT i_billing_main_temp INTO wa_billing_main.
        CLEAR : wa_comwa,wa_vbfa.
        REFRESH i_vbfa.
        wa_comwa-vbeln = wa_billing_main-vbeln.
    This function module used for retrieving document flow data from VBFA
        CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
          EXPORTING
            comwa    = wa_comwa
          TABLES
            vbfa_tab = i_vbfa.
        SORT i_vbfa BY vbelv vbeln vbtyp_n.
        DELETE ADJACENT DUPLICATES FROM i_vbfa COMPARING vbelv vbeln vbtyp_n.
        SORT i_vbfa BY vbtyp_n.
        READ TABLE i_vbfa
                 INTO wa_vbfa
                 WITH KEY vbtyp_n  =  c_vbtyp_n
        BINARY SEARCH.
        IF sy-subrc EQ 0.
          wa_ref_data-vbeln = wa_vbfa-vbeln.
          wa_ref_data-vbelv = wa_billing_main-vbeln.
          APPEND wa_ref_data TO i_ref_data.
        ENDIF.
      ENDLOOP.
    so kindly give me the solution for improving performance of this issue.
    Is it having any function module to pass multiple inputs to the function module.?
    Regards
    P.Senthil Kumar
    Edited by: senthil kumar on Mar 23, 2009 12:23 PM

    Please add  check condition to check  internal table is blank.
    if not i_billing_main[] is initial.
    SELECT vbelv
    vbeln
    INTO TABLE i_ref_data
    FROM vbfa FOR ALL ENTRIES IN i_billing_main
    WHERE
    vbelv EQ i_billing_main-vbeln AND
    vbtyp_n EQ c_vbtyp_n.
    endif.
    This is the best possible way to retrive data from VBFA table.
    Other method you adopted will take more time since you are calling the FM in loop.
    Please check ST05 trace for your above query to see if primary index is being used. Else contact Basis to help you out.

  • Function module to find table entries associated with transport request

    Hi all,
       I have requirement, like we have created a table and maintenance view for that table - and made entries in that table.
       now we want to know all the entries made in the table are associated with transport request or not.
      how to do it programmatically?? is there any function module which gives the result for transport object associated with the table entries ?????
    Thanks
    Sathish

    Hi,
    Use the table <b>E071K</b>
    in se16 give :
    request number in TRKORR
    Table name in OBJNAME
    in the filed TABKEY u will get the <b>values of the key fields</b> in the table
    by comparing the key fields u can find out the enrties related to the request number
    Please let me know if i am not clear
    ---Patil
    Message was edited by:
            Santhosh Patil
    null

  • Execute function module from Custom Table Value?

    Hi,
    I have custom table with following field
    FUNNAME        CHAR    1000
    That contains records like the following
    CALL FUNCTION 'ZMATF' EXPORTING MATNR = P_MATNR IMPORTING MATDESCRIPTION = V_MATERIALDESC.
    CALL FUNCTION 'Y_CHECK_EXIT' EXPORTING USEREXIT = 'EFNDTAXWAR' IMPORTING EXECUTE  =  EXECUTE TABLES I_ZA01   =  I_ZA01.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING WAIT = 'X'.
    CALL FUNCTION 'RS_TABLE_LIST_CREATE' EXPORTING TABLE_NAME = TABNAME.
    My requirement is according some of the user conditions i need to select entry from this table and execute the corresponding function module
    I tried to use GENERATE SUBROUTINE POOL itab NAME name. But this have limitation of 36 subroutine pools for one program.
    Any info highly appreciated.
    aRs

    If you can put the name of the FM in a variable and the parameters and exceptions in separate internal tables, then you can call the function modules using the statement:
    <b>call function NAME
      parameter-table
        PARA_TAB
      exception-table
        EXCP_TAB.</b>
    See a small example:
    Example
    type pools ABAP.
    data NAME type STRING value `READ_SPFLI_INTO_TABLE`.
    data PARA_TAB type ABAP_FUNC_PARMBIND_TAB.
    data PARA_LINE like line of PARA_TAB.
    data EXCP_TAB type ABAP_FUNC_EXCPBIND_TAB.
    data EXCP_LINE like line of EXCP_TAB.
    data CARRIER type SPFLI-CARRID.
    data JTAB type SPFLI_TAB.
    CARRIER = 'XYZ'.
    PARA_LINE-NAME = 'ID'.
    PARA_LINE-KIND = ABAP_FUNC_EXPORTING.
    get reference of CARRIER into PARA_LINE-VALUE.
    append PARA_LINE to PARA_TAB.
    PARA_LINE-NAME = 'ITAB'.
    PARA_LINE-KIND = ABAP_FUNC_IMPORTING.
    get reference of JTAB into PARA_LINE-VALUE.
    append PARA_LINE to PARA_TAB.
    EXCP_LINE-NAME = 'NOT_FOUND'.
    EXCP_LINE-VALUE = 1.
    insert EXCP_LINE into table EXCP_TAB.
    EXCP_LINE-NAME = 'OTHERS'.
    EXCP_LINE-VALUE = 4.
    insert EXCP_LINE into table EXCP_TAB.
    call function NAME
      parameter-table
        PARA_TAB
      exception-table
        EXCP_TAB.
    case SY-SUBRC.
      when 1.
        message id SY-MSGID type SY-MSGTY number SY-MSGNO.
      when 2.
        message E888(SABAPDOCU) with 'Error in  function module'.
    endcase.
    REgards,
    Ravi

  • Generic Extraction By Using function Module with Three Table fields?

    Hi,
    I need to bring the data from three tables by using function module.
    Tables: VBAK, VBAP, VBUK.
    Fields are: VBELN, ERDAT, NETWR, WEARK, POSNR, MATNR, FKART, FKTYP.
    i referred some of the documents in SDN, it explained by using two table fields.
    Please help me.

    hi, the below pseudo code should help you on creating the logic. It's based on the how to paper. So i just used the parts of intrest. You need to copy the rest form the document. Please notice that this is pseudo code. if you just copy/paste, it will not work.
    IF s_counter_datapakid = 0.
    OPEN CURSOR WITH HOLD s_cursor FOR
           SELECT fields       FROM table1         WHERE condition
          ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
          FETCH NEXT CURSOR s_cursor
                    INTO  TABLE e_t_data
                    PACKAGE SIZE s_s_if-maxsize.
         IF sy-subrc EQ 0.
           SELECT fields      FROM table2      WHERE condition into itab2 for all entries in e_t_data
           SELECT fields      FROM table3       WHERE condition into itab3 for all entries in e_t_data    
         loop at e_t_data
              read itab2. move corresponding fields to e_t_data
              read itab3. move corresponding fields to e_t_data
              collect e_t_data.
         endif.
    IF sy-subrc <> 0.
           CLOSE CURSOR s_cursor.
           RAISE no_more_data.
         ENDIF.
         s_counter_datapakid = s_counter_datapakid + 1.
       ENDIF.              "Initialization mode or data extraction ?

  • Datasources with function module which uses table type

    hi..
    I am creating a datasource which extracts data using a function module from xRPM to BW. When creating the function module it gives an error " TABLES parameters are obsolete!" while trying to specify the extract structure. I searched in SDN and learnt that we need to use table types and use that in the changing tab.Not sure how that works and where we need to use the extract structure for this.
    Could someone please explain this to me and let me know how i can create my datasource using this type of function module.

    Hi,
    in your case you need the tables parameter, as the service api expects the result of the fm in a table called e_t_data. Of course table parameters are obsolet but you can just ignore the warning and it will work.
    regards
    Siggi
    PS: Extraction fm must follow a strict interface definition.
    Message was edited by:
            Siegfried Szameitat

  • SM21 Messages stored in function modules or database tables.

    Hi Everyone,
    Can anyone please inform me where the messages from SM21 are stored, i.e in which function modules or through which data base tables. And how can I retrieve those messages in my ABAP program for a specific error.
    Please respond the earlier the better.
    Thanks,
    Prashant.

    Check with the table.
    T100 Messages
    Regards,
    Maha

Maybe you are looking for