How to edit a field catalogue

hi experts,
               How can we edit feild catalogue in an alv and after editing it the output should display in an new output list or in a new report  after we press a button
thanks
harish

hi Harish,
you can make field catalog manually as shown below:
PERFORM build_fieldcat TABLES i_fieldcat[]
  USING :
*-Output-field Table          Len   Ref tab   Ref field    Heading     Col_pos
   'VBELN'       'T_ITAB1'     10   'VBAP'  'VBELN'       ''                 1,
   'POSNR'       'T_ITAB1'     6    'VBAP'  'POSNR'      ''                 2,
   'WERKS'       'T_ITAB1'     4    'VBAP'  'WERKS'     ''                3,
   'LGORT'       'T_ITAB1'     4    'VBAP'  'LGORT'        ''                4.
and now u can make changes in it as per your format of output you want.
regards
rahul
Edited by: RAHUL SHARMA on Dec 18, 2008 8:50 AM

Similar Messages

  • Hi gurus in ALV how to edit the fields on out put list

    hi gurus in ALV how to edit the fields on out put list

    hi
    REPORT ZSB_ALV_EDITABLE_SAMPLE.
    TABLES: SFLIGHT.
    DATA: gc_container TYPE scrfname VALUE 'LIST_AREA',
    gc_custom_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    gc_grid TYPE REF TO CL_GUI_ALV_GRID,
    gs_layout TYPE LVC_S_LAYO,
    gt_fieldcat TYPE LVC_T_FCAT.
    DATA: ok_code TYPE SY-UCOMM.
    DATA: gt_outtab TYPE TABLE OF SFLIGHT.
    *DYNPRO
    CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS '100'.
    CREATE OBJECT gc_custom_container
    EXPORTING
    container_name = gc_container
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    CREATE OBJECT gc_grid
    EXPORTING
    i_parent = gc_custom_container
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5 .
    PERFORM prepare_field_catalog CHANGING gt_fieldcat .
    PERFORM prepare_layout CHANGING gs_layout .
    PERFORM get_alv_display.
    ENDMODULE.
    *& Module USER_COMMAND_0100 INPUT
    MODULE USER_COMMAND_0100 INPUT.
    OK_CODE = SY-UCOMM.
    IF OK_CODE = 'BACK'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR OK_CODE.
    ENDIF.
    ENDMODULE.
    FORM prepare_field_catalog CHANGING gt_fieldcat TYPE LVC_T_FCAT.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_BUFFER_ACTIVE =
    I_STRUCTURE_NAME = 'SFLIGHT'
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_BYPASSING_BUFFER =
    I_INTERNAL_TABNAME =
    CHANGING
    ct_fieldcat = gt_fieldcat[].
    ENDFORM.
    FORM prepare_layout changing p_gs_layout TYPE lvc_s_layo.
    p_gs_layout-zebra = 'X'.
    p_gs_layout-edit = 'X'.
    ENDFORM. " prepare_layout
    FORM get_alv_display .
    SELECT * FROM sflight INTO TABLE gt_outtab UP TO 10 ROWS.
    CALL METHOD gc_grid->set_table_for_first_display
    EXPORTING
    I_STRUCTURE_NAME = 'SFLIGHT'
    IS_LAYOUT = gs_layout
    CHANGING
    it_outtab = gt_outtab
    IT_FIELDCATALOG = gt_fieldcat
    ENDFORM. " get_alv_display

  • How to edit "Credit" field for lots of shots all in once?

    I can't seem to be able to know how to edit "Credit" field for lots of shots all in once.
    I made a mistake of not focusing on the autofill feature which did put my friend's name instead of mine.
    How to correct this mistake without modifying EACH shot been imported alone (and there is plenty of them), I don't know about you but it looks like a total time waste.
    Aperture 2.1.3

    I apologize,but this is just too much info for me to type.
    Go to Help >> Aperture User Manual and read
    Working with Metadata Views Page 281
    Working with Metadata Presets Page 284
    Batch Changing Metadata Page 288
    DLS

  • How to Edit Key Fields or Delete Lines from Table Entries

    Hi Experts
    While releasing Transport Request Number we are getting an error during release. This seems to be as a result of improper data feed while running of eCATT's . The dates in the all these fields have been entered as "  .   .0101" which is in the wrong format ( eg. Table T811F u2013u201CSDATEu201D field). "SDATE" seems to the key field of the table . Can you please guide on how we may delete these lines or edit the field in the table.
    Regards
    Ananda

    Hello,
    I dont think its a good idea to delete the records from those standard tables. You rather re-run your ecatt and edit/update the existing records and try.
    regds,
    Kiran

  • How to create a field catalogue dynamically?

    Hi guys,
          I have to create a field catalogue dynamically. I am creating the internal table dynamcially. It is <fs_dyn_table>. I am passing this to the function module REUSE_ALV_FIELDCATALOG_MERGE.
    <fs_dyn_table> contains five fields kunnr, land1, name1, ort01 and telf1 which i am passing from selection screen.
    This is how my function module is
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = sy-repid
       i_internal_tabname             = '<FS_DYN_TABLE>'
       i_inclname                     = sy-repid
        CHANGING
          ct_fieldcat                  = it_fcat
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3.
    I am not getting any values in the internal table it_fcat.
    I would like to know if there is any other way to create field catalogue?
    Help will be appreciated.
    Thanks,
    Ibrahim

    Hi,
    Kindly refer wiki links:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/complete%252bcode%252bfor%252bdynamic%252bfield%252bcatalog%252bcreation
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/create%252ban%252balv%252b(%252bUsing%252bOOABAP%252b)with%252bdynamic%252bField-Catalog
    Hope they help you.
    Regards,
    Tarun

  • How to edit signature fields in Adobe EchoSign

    In this tutorial, learn how to use digital signatures, including how to edit electronic signature fields and other input fields in Adobe EchoSign.

    It will depend on the image. If it was one that was saved as a psd file and has layers (window>layers) {Look in the layers panel and see if you see a layer with a thumbnail that looks like a large T} In this instance, you can double click on that thumbnail to highlight the text then type in its replacement.
    If the image is a jpg which does not support layers, transparency or live text, then that would mean that you need to use the selection tools to select that text and fill it with the same color as the background. You can then use the text tool to type in the text you want.
    Remember to save a copy as a psd file so you can edit the text at a later date.

  • How to edit particular field in alv list display

    hi,
    i am displaying output using alv list display. my as follows.
    runrate maheed  a01.
    here if i click a01  it has to show iin edit mode earlier it has to show display mode only. when i select by that time it has to show edit mode there i will change into a02 and i will click save button this is my requirement.
    anybody can send me the sample code please.
    thanks,
    maheedhar.t

    following is my field cata log
      w_field-fieldname = 'APPLN'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-seltext_l = text-m01.
      w_field-outputlen = '10'.
      w_field-col_pos = 1.
      append w_field to i_field.
      clear w_field.
    now i am writng like this
      w_field-fieldname = 'APPLN'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-seltext_l = text-m01.
      w_field-EDIT = 'X'.      "maheed
      w_field-outputlen = '10'.
      w_field-col_pos = 1.
      append w_field to i_field.
      clear w_field.
    eventhough it is not allowing me to edit the field when i click that field in the output.
    thanks,
    maheedhar.t

  • How to edit 'description' field

    The description field in iTunes has data that I entered. I can see it, but I cannot find where I can edit that field at. It does not appear to be an editable field in the Get Info window. Any help is appreciated. Thanks!

    I don't use a new iTunes but I thought there was some way you could add fields to edit to the Get Info window. If not, check the Dougscripts web site for scripts to do this.

  • How to Edit a Field inside an operation in Sybase Unwired Platform

    Hi,
    We are using SUP SP04 and back-end with SAP RFC.
    I have created an operation called 'CreateIssue'.
    The operation 'CreateIssue' uses an RFC called 'CREATE_ISSUE'.
    The mapping has been done between the client parameters of our operation and the remote operation arguments of the RFC.
    In SAP RFC, the datatype is defined as STRING(0). But In SUP it is showing as STRING(300).
    Among all the input parameters of the operation, I want to change the datatype of a variable from STRING(300) to STRING(3000).
    Since this is not editable, how to change the size of the string variable?
    Kindly suggest.
    Thanks in advance.
    Regards
    Debidutta

    hi Harish,
    you can make field catalog manually as shown below:
    PERFORM build_fieldcat TABLES i_fieldcat[]
      USING :
    *-Output-field Table          Len   Ref tab   Ref field    Heading     Col_pos
       'VBELN'       'T_ITAB1'     10   'VBAP'  'VBELN'       ''                 1,
       'POSNR'       'T_ITAB1'     6    'VBAP'  'POSNR'      ''                 2,
       'WERKS'       'T_ITAB1'     4    'VBAP'  'WERKS'     ''                3,
       'LGORT'       'T_ITAB1'     4    'VBAP'  'LGORT'        ''                4.
    and now u can make changes in it as per your format of output you want.
    regards
    rahul
    Edited by: RAHUL SHARMA on Dec 18, 2008 8:50 AM

  • How to edit particular field in alv list display-urgent

    HI ALL,
    my requirement is i am displaying output using alv list display. now my rewuirement :
    i am displaying out in edit mode only. when user clicks one particular field
    for example record is like
    runrate a01 maheed  -> if user clicks on a01 this field should be editable. i have a following code
      w_field-edit = w_edit.
      w_field-input = 'X'.    -> using this code i can able to display entire colomn in edit mode. this not suits my requirement.anybody can send me the sample code please.
    thanks,
    maheedhar.t

    Can you please send me the sample code plz.
    i am sending my code below.
    type-pools : slis.
    tables : zuser_secobjects.
    data : t_header1 like zuser_secobjects.
    data : begin of it_secobjects occurs 0.
            include structure t_header1.
    data :   checkbox type c value 'X',
            action type c,
          end of it_secobjects.
    data : begin of it_secobjects1 occurs 0.
            include structure ZUSER_SECOBJECTS.
    data :   checkbox type c VALUE 'X',
          end of it_secobjects1.
    data : wa_ita like line of it_secobjects.
    data : i_field type slis_t_fieldcat_alv with header line.
    data : w_field like line of i_field.
    data : i_sort type slis_t_sortinfo_alv.
    data : w_sort like line of i_sort.
    data : it_filt1 type slis_t_filter_alv with header line.
    data:
    i_tabname type tabname,
    i_repid like sy-repid,
    is_lout type slis_layout_alv.
    data :   it_filt type slis_t_filter_alv   with header line,
             it_evts type slis_t_event        with header line.
    DATA : is_vari type disvariant.
    constants :   c_default_vari value 'X',
                  c_save_vari    value 'U',
                   c_checkfield type slis_fieldname     value 'ACTION',
                   c_f2code     type sy-ucomm           value '&ETA'.
    data : chk_box type slis_fieldname.
    selection-screen: begin of block b1 with frame title text-t01.
    parameters : p_appln type zuser_secobjects-appln.
    parameters : p_user type usr02-bname, "zuser_secobjects-appln_user,
    p_partnr type zuser_secobjects-appln_partner,
    p_ptype type zuser_secobjects-partner_type default '02',
    p_upostn type zuser_secobjects-user_position,
    p_sdate like likp-erdat default sy-datum,
    p_edate(10) default '12/31/9999',
    p_revnum type zuser_secobjects-revnum,
    p_cted type zuser_secobjects-created_by,
    p_cdate type zuser_secobjects-creation_date,
    p_ctime type zuser_secobjects-creation_time,
    p_chnby type zuser_secobjects-changed_by,
    p_cdate1 type zuser_secobjects-changed_date,
    p_ctime1 type zuser_secobjects-changed_time.
    selection-screen: end of block b1.
    form user_command using p_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case p_ucomm.
        when 'SELECT_ALL'. " SELALL is the FCODE of ur push button
          loop at it_secobjects into wa_ita.
            wa_ita-checkbox = 'X'.
            modify it_secobjects from wa_ita.
          endloop.
      rs_selfield-refresh = 'X'.   "<-  ADD THIS
      when 'DESLCT_ALL'.
        loop at it_secobjects into wa_ita.
            wa_ita-checkbox = ' '.
            modify it_secobjects from wa_ita.
          endloop.
    rs_selfield-refresh = 'X'.   "<-  ADD THIS
       is_lout-f2code               = c_f2code.
       is_lout-box_fieldname        = c_checkfield.
       is_lout-get_selinfos         = 'X'.
       is_lout-detail_popup         = 'X'.
       is_lout-detail_initial_lines = 'X'.
    maheed-start.
    *when 'SAVE'.
    *LOOP AT IT_SECOBJECTS WHERE CHECKBOX = 'X'.
    MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
    APPEND IT_SECOBJECTS1.
    CLEAR IT_SECOBJECTS1.
    DELETE IT_SECOBJECTS.
    *ENDLOOP.
    *DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
    WHEN 'DELETE'.
        loop at it_SECOBJECTS where checkbox eq 'X'.
            delete it_SECOBJECTS.
        endloop.
    *RS_SELFIELD-REFRESH = 'X'.
    maheed-end.
    maheed-start.  apr 13
    WHEN 'DELETE'.
    loop at it_SECOBJECTS where checkbox eq 'X'.
    MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
    APPEND IT_SECOBJECTS1.
    delete it_SECOBJECTS.
    endloop.
    RS_SELFIELD-REFRESH = 'X'.
    when 'SAVE'.
    DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
    commit work.
    refresh :IT_SECOBJECTS1.
    maheed-end.    apr 13
    *when 'SAVE'.
    *LOOP AT IT_SECOBJECTS WHERE CHECKBOX = 'X'.
    MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
    APPEND IT_SECOBJECTS1.
    CLEAR IT_SECOBJECTS1.
    DELETE IT_SECOBJECTS.
    *ENDLOOP.
    *DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
    ENDCASE.
    endform.
    *&      Form  delete
    form delete.
      data : begin of is_secobjects occurs 0.
              include structure zuser_secobjects.
      data : checkbox type c.
      data : end of is_secobjects.
      is_secobjects-checkbox = 'X'.
      modify is_secobjects
        from it_secobjects
        transporting checkbox
      where checkbox = 'X'.
    endform.
    *&      Form  get_data
    form get_data.
      select * from zuser_secobjects
      into table it_secobjects.
    endform.                    " get_data
    *&      Form  prepare_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form prepare_fieldcatalog." USING w_edit TYPE any.
    data : w_edit type c.
    clear w_edit.
      clear: w_field,i_field.
      refresh:i_field.
      i_field-key = 'X'.
      i_field-col_pos = 1.
      i_field-ddictxt = 'S'.
      i_field-seltext_s = '@11@'.
    i_field-checkbox = 'X'.
      i_field-input = 'X'.
      i_field-fieldname = 'HEADER'.
      i_field-outputlen = 0.
      append i_field.
      clear i_field.
      w_field-fieldname = 'APPLN'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-seltext_l = text-m01.
      w_field-outputlen = '10'.
      w_field-EDIT = 'X'.      "maheed
      w_field-col_pos = 1.
      append w_field to i_field.
      clear w_field.
      w_field-fieldname = 'APPLN_USER'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-just = 'C'.
      w_field-seltext_l = text-m02.
      w_field-outputlen = '7'.
      w_field-col_pos = 2.
      append w_field to i_field.
      clear w_field.
      w_field-fieldname = 'APPLN_PARTNER'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-just = 'C'.
      w_field-seltext_l = text-m03.
      w_field-edit = w_edit.
      w_field-input = 'X'.
      w_field-outputlen = '7'.
      w_field-col_pos = 2.
      append w_field to i_field.
      clear w_field.
      w_field-fieldname = 'INACTIVE'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-just = 'C'.
      w_field-seltext_l = text-m02.
      w_field-outputlen = '7'.
      w_field-col_pos = 3.
      append w_field to i_field.
      clear w_field.
    endform.                    " prepare_fieldcatalog
    *&      Form  ALV_LIST_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    form alv_list_display.
    DATA : LC_GLAY TYPE LVC_S_GLAY.
    LC_GLAY-EDT_CLL_CB = 'X'.
      i_repid = sy-repid.
      is_lout-box_fieldname = 'CHECKBOX'.
      it_filt-fieldname = 'ACTION'.
      call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program       = i_repid
                i_callback_pf_status_set = 'PF_STATUS_SET'
                i_callback_user_command  = 'USER_COMMAND'
                is_layout                = is_lout
                it_fieldcat              = i_field[]
                it_filter                = it_filt[]
                 it_events                = it_evts[]
                i_default                = c_default_vari
                i_save                   = c_save_vari
                is_variant               = is_vari
           tables
                t_outtab                 = it_secobjects.
    endform.                    " ALV_LIST_DISPLAY
    *&      Form  display
          text
         -->P_I_OBJECT  text
    form display using    object.
      case object.
    ENDCASE.
    endform.                    " display
    thanks,
    maheedhar.t

  • How to Edit Custom Fields of Project Server 2010 Programatically

    Hello,
    I want to change the Custom field value of Project Server 2010. I am following the brain article. My problem is the code run successfully but the changes did not reflect to the Project server. Following is my code, Any Help??
    private void UpdateRecordInProjectServer(string newValue, string projGuid, string propertyToEdit)
                ProjectSoapClient projectSvc = new ProjectSoapClient();
                CustomFieldsSoapClient customfieldSvc = new CustomFieldsSoapClient();
                CustomFieldDataSet fieldDefs = customfieldSvc.ReadCustomFields(string.Empty, false);
                LookupTableSoapClient loockuptableSvc = new LookupTableSoapClient();
                Guid projectId = new Guid(projGuid);
                ProjectDataSet projectDs = projectSvc.ReadProject(projectId, ListProjects.Project.DataStoreEnum.WorkingStore);
                foreach (ProjectDataSet.ProjectCustomFieldsRow cfRow in projectDs.ProjectCustomFields.Rows)
                   // projectDs.ProjectCustomFields.RemoveProjectCustomFieldsRow(cfRow);
                    CustomFieldDataSet.CustomFieldsRow fieldDefinition = fieldDefs.CustomFields.Single(
                            cfd => cfd.MD_PROP_UID == cfRow.MD_PROP_UID);
                    if (fieldDefinition.MD_PROP_NAME == propertyToEdit)
                        cfRow.TEXT_VALUE = newValue;
                    //projectDs.ProjectCustomFields.AddProjectCustomFieldsRow(cfRow);
                    projectDs.ProjectCustomFields.AcceptChanges();
                Guid sessionUid = Guid.NewGuid();
                Guid jobUid = Guid.NewGuid();
                if (!IsProjectCheckedOut(projectId))
                    projectSvc.CheckOutProject(projectId, sessionUid, "Updating
    CF");
                    jobUid = Guid.NewGuid();
                    projectSvc.QueueUpdateProject(jobUid, sessionUid, projectDs, false);
                    System.Threading.Thread.Sleep(4000);
                jobUid = Guid.NewGuid();
                projectSvc.QueueCheckInProject(jobUid, projectId, false, sessionUid, "Updating
    CF");
                System.Threading.Thread.Sleep(4000);
                jobUid = Guid.NewGuid();
                projectSvc.QueuePublish(jobUid, projectId, true, SPContext.Current.Site.Url);
                System.Threading.Thread.Sleep(4000);
    Muhammad Ali

    Try this instead of your last section(after last "if" statement):
    jobUid = Guid.NewGuid();
                projectSvc.CheckOutProject(projectId,
    sessionUid, "Updating CF");
                System.Threading.Thread.Sleep(4000);
                projectSvc.QueueUpdateProject(jobUid, sessionUid,
    projectDs, false); 
    System.Threading.Thread.Sleep(4000);
                projectSvc.QueuePublish(jobUid, projectId, true, SPContext.Current.Site.Url);
                System.Threading.Thread.Sleep(4000);
    Here is QueueUpdateProject inserted before Publish and checkIn replaced with checkOut

  • How to edit o/p fields in hierarchical list?

    how to make output fields as input enabled, displayed in the hierarchical list?
    i.e. to make them as editable?Is it possible in list display?

    Please refer this....
    *& Report ZFIR_WRITE_OFF
    REPORT zfir_write_off
    NO STANDARD PAGE HEADING
    MESSAGE-ID zles.
    TYPE-POOLS
    TYPE-POOLS:slis.
    TABLES
    TABLES: kna1, t001, zdunning_data, bsid, t052.
    INTERNAL TABLES
    To check for bukrs in selection screen
    DATA: BEGIN OF t_t001 OCCURS 0,
    bukrs TYPE t001-bukrs,
    END OF t_t001.
    To check for the customer in selection screen
    DATA: BEGIN OF t_kna1 OCCURS 0,
    kunnr TYPE kna1-kunnr,
    name1 TYPE kna1-name1,
    END OF t_kna1.
    *Data from BSID table
    DATA: BEGIN OF t_bsid OCCURS 0,
    bukrs LIKE bsid-bukrs,
    budat LIKE bsid-budat,
    kunnr LIKE bsid-kunnr,
    belnr LIKE bsid-belnr,
    zfbdt LIKE bsid-zfbdt,
    zterm LIKE bsid-zterm,
    dmbtr LIKE bsid-dmbtr,
    waers LIKE bsid-waers,
    vbeln LIKE bsid-vbeln,
    END OF t_bsid.
    *Data from ZDunning_data
    DATA: BEGIN OF t_zdunning OCCURS 0,
    belnr LIKE zdunning_data-belnr,
    kunnr LIKE zdunning_data-kunnr,
    zdef_notice_flg LIKE zdunning_data-zdef_notice_flg,
    zterm_notice_flg LIKE zdunning_data-zterm_notice_flg,
    END OF t_zdunning.
    *Data from t052 for base line days
    DATA: BEGIN OF t_t052 OCCURS 0,
    zterm LIKE t052-zterm,
    ztag1 LIKE t052-ztag1,
    END OF t_t052.
    *with duedate and date for write off calculation
    DATA: BEGIN OF t_data OCCURS 0,
    belnr LIKE bsid-belnr,
    kunnr LIKE bsid-kunnr,
    zterm LIKE bsid-zterm,
    zfbdt LIKE bsid-zfbdt,
    ztag1 LIKE t052-ztag1,
    duedate LIKE bsid-zfbdt,
    wdate LIKE bsid-zfbdt,
    vbeln LIKE bsid-vbeln,
    dmbtr LIKE bsid-dmbtr,
    waers LIKE bsid-waers,
    budat LIKE bsid-budat,
    vbelv like vbfa-vbelv,
    Name1 like kna1-name1,
    END OF t_data.
    *Output display in ALV report
    DATA: BEGIN OF t_output OCCURS 0,
    Flag type C,
    bukrs LIKE bsid-bukrs,
    kunnr LIKE bsid-kunnr,
    vbeln LIKE bsid-vbeln, "Invoice
    posnv like vbfa-posnv,
    wdate LIKE bsid-zfbdt,
    belnr LIKE bsid-belnr,
    dmbtr LIKE bsid-dmbtr,
    waers LIKE bsid-waers,
    budat LIKE bsid-budat,
    vbelv like vbfa-vbelv, "Contract
    name1 like kna1-name1,
    duedate like bsid-zfbdt,
    END OF t_output.
    To get contract number for the billing document number
    DATA: BEGIN OF t_vbfa OCCURS 0,
    vbelv LIKE vbfa-vbelv,
    vbeln LIKE vbfa-vbeln,
    POSNV like vbfa-POSNV,
    END OF t_vbfa.
    data: begin of t_cust occurs 0,
    KUNNR like kna1-kunnr,
    name1 like kna1-name1,
    end of t_cust.
    data: begin of t_head occurs 0,
    VBELv like vbfa-vbelv,
    posnv like vbfa-posnv,
    VKUEGRU type ZLIST_WO_RCANCEL,
    end of t_head.
    data: begin of it_veda occurs 0,
    VBELn LIKE Veda-VBELN,
    POSNR LIKE Veda-VPOSN,
    VKUEGRU LIKE Veda-VKUEGRU,
    end of it_veda.
    VARIABLE DECLARATION
    DATA: l_duedate LIKE bsid-zfbdt,
    l_wdate LIKE bsid-zfbdt.
    VARIABLE FOR ALV DISPLAY
    DATA: t_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: t_fieldcat1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    wa_fieldcat1 TYPE slis_fieldcat_alv.
    DATA: t_layout TYPE slis_layout_alv.
    DATA: g_repid LIKE sy-repid.
    SELECTION-SCREEN
    *Selection Screen Parameters for user input
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:
    *Company Code
    p_bukrs LIKE t001-bukrs OBLIGATORY.
    SELECT-OPTIONS:
    *Customer Number
    s_kunnr FOR kna1-kunnr OBLIGATORY DEFAULT '0' TO 'ZZZZZZZZZZ'.
    PARAMETERS:
    *Write Off Date
    p_wodate TYPE sy-datum OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1 .
    AT SELECTION-SCREEN
    *Selection Screen validation for Company code
    AT SELECTION-SCREEN ON p_bukrs.
    SELECT SINGLE bukrs FROM t001 "#EC *
    INTO t_t001
    WHERE bukrs = p_bukrs.
    IF sy-subrc NE 0.
    *Error message for Invalid Company Code
    MESSAGE e000 WITH text-002.
    ENDIF.
    *Selection Screen Validation for Customer
    AT SELECTION-SCREEN ON s_kunnr.
    IF NOT s_kunnr IS INITIAL.
    SELECT SINGLE kunnr name1
    FROM kna1 "#EC *
    INTO t_kna1
    WHERE kunnr IN s_kunnr.
    IF sy-subrc NE 0.
    *Error message for Invalid Customer Number
    MESSAGE e000 WITH text-003.
    ENDIF.
    ENDIF.
    AT SELECTION-SCREEN ON p_wodate.
    IF p_wodate IS INITIAL.
    p_wodate = sy-datum.
    ENDIF.
    INITIALIZATION
    INITIALIZATION.
    PERFORM clear_data.
    START-OF-SELECTION
    START-OF-SELECTION.
    *Get the Accounting Document Number and base line date from BSID
    SELECT bukrs kunnr belnr budat zfbdt zterm dmbtr waers vbeln
    FROM bsid
    INTO corresponding fields of TABLE t_bsid
    WHERE kunnr IN s_kunnr AND
    bukrs = p_bukrs.
    IF NOT t_bsid[] IS INITIAL.
    *Get the Dunning data based on the Accounting Document Number from BSID
    SELECT belnr kunnr zdef_notice_flg zterm_notice_flg
    FROM zdunning_data
    INTO TABLE t_zdunning
    FOR ALL ENTRIES IN t_bsid
    WHERE kunnr = t_bsid-kunnr AND
    belnr = t_bsid-belnr AND
    zdef_notice_flg = 'Y' AND
    zterm_notice_flg = 'Y'.
    *Get the base line days from t052 table based on BSID data
    SELECT zterm ztag1
    FROM t052
    INTO TABLE t_t052
    FOR ALL ENTRIES IN t_bsid
    WHERE zterm = t_bsid-zterm.
    *Calculate the due date(bse line date BSID-ZFBDT + base line days
    *T052-ZTAG )
    IF NOT t_zdunning[] IS INITIAL.
    Get the customer name
    Select KUNNR NAME1 from KNA1
    INTO table t_cust
    for all entries in t_zdunning
    where kunnr = t_zdunning-kunnr.
    LOOP AT t_zdunning.
    LOOP AT t_bsid.
    CLEAR t_zdunning.
    READ TABLE t_zdunning WITH KEY belnr = t_bsid-belnr
    kunnr = t_bsid-kunnr.
    CHECK sy-subrc = 0.
    CLEAR t_t052.
    READ TABLE t_t052 WITH KEY zterm = t_bsid-zterm.
    IF sy-subrc = 0 .
    t_data-belnr = t_zdunning-belnr.
    t_data-kunnr = t_zdunning-kunnr.
    Clear t_cust.
    read table t_cust with key kunnr = t_zdunning-kunnr.
    if sy-subrc = 0.
    t_data-name1 = t_cust-name1.
    endif.
    t_data-zterm = t_bsid-zterm.
    t_data-zfbdt = t_bsid-zfbdt.
    t_data-ztag1 = t_t052-ztag1.
    t_data-vbeln = t_bsid-vbeln.
    t_data-dmbtr = t_bsid-dmbtr.
    t_data-waers = t_bsid-waers.
    t_data-budat = t_bsid-budat.
    *calculate duedate
    CLEAR l_duedate.
    l_duedate = t_bsid-zfbdt + t_t052-ztag1.
    t_data-duedate = l_duedate.
    *calculate date for write off
    CLEAR l_wdate.
    l_wdate = l_duedate + 180.
    t_data-wdate = l_wdate.
    APPEND t_data.
    CLEAR l_wdate.
    CLEAR l_duedate.
    ENDIF.
    ENDLOOP.
    ELSE.
    MESSAGE s000 WITH text-005.
    ENDIF.
    *Check the wdate with write off date in the selection screen value.
    *If this calculated date is Greater than value enetred in selection
    *screen, display the corresponding data in ALV report.
    IF NOT t_data[] IS INITIAL.
    SELECT vbelv vbeln
    POSNV
    FROM vbfa
    INTO TABLE t_vbfa
    FOR ALL ENTRIES IN t_data
    WHERE vbeln = t_data-vbeln.
    and
    VBTYP_V = 'G'.
    *If reason for cancelation is there, no writeoff.
    Select VBELn VPOSN VKUEGRU from Veda
    into table it_veda
    for all entries in t_vbfa
    where vbeln = t_vbfa-vbelv.
    SELECT vbelv
    POSNV
    FROM vbfa
    INTO TABLE t_Head
    FOR ALL ENTRIES IN t_data
    WHERE vbeln = t_data-vbeln
    and
    VBTYP_V = 'G'.
    loop at t_head.
    clear it_veda.
    Read table it_veda with key vbeln = t_head-vbelv
    posnr = t_head-posnv.
    if not it_veda-VKUEGRU is initial.
    Delete t_head where vbelv = it_veda-vbeln and
    posnv = it_veda-posnr.
    endif.
    endloop.
    LOOP AT t_data.
    IF t_data-wdate LE p_wodate.
    t_output-bukrs = p_bukrs.
    t_output-kunnr = t_data-kunnr.
    CLEAR t_vbfa.
    READ TABLE t_vbfa WITH KEY vbeln = t_data-vbeln.
    read table t_head with key vbelv = t_vbfa-vbelv
    posnv = t_vbfa-posnv.
    if sy-subrc = 0.
    t_output-vbelv = t_vbfa-vbelv.
    t_output-posnv = t_vbfa-posnv.
    t_output-name1 = t_data-name1.
    t_output-wdate = t_data-wdate.
    t_output-belnr = t_data-belnr.
    t_output-dmbtr = t_data-dmbtr.
    t_output-waers = t_data-waers.
    t_output-budat = t_data-budat.
    t_output-vbeln = t_data-vbeln.
    t_output-duedate = t_data-duedate .
    APPEND t_output.
    ENDIF.
    clear t_output.
    ENDIF.
    ENDLOOP.
    ELSE.
    MESSAGE s000 WITH text-006.
    ENDIF.
    *ALV display for the output records
    IF NOT t_output[] IS INITIAL.
    PERFORM alv_display.
    ELSE.
    MESSAGE s000 WITH text-006.
    ENDIF.
    ELSE.
    MESSAGE s000 WITH text-004.
    ENDIF.
    *& Form clear_data
    text
    --> p1 text
    <-- p2 text
    FORM clear_data .
    CLEAR:t_t001,
    t_kna1,
    t_bsid,
    t_zdunning,
    t_t052,
    t_data,
    t_output,
    wa_fieldcat,
    t_layout,
    t_fieldcat,
    t_vbfa.
    REFRESH:t_t001,
    t_kna1,
    t_bsid,
    t_zdunning,
    t_t052,
    t_data,
    t_output,
    t_fieldcat,
    t_vbfa.
    clear:t_head,
    it_veda.
    Refresh:t_head,
    it_veda.
    Clear T_cust.
    Refresh t_data.
    ENDFORM. " clear_data
    *& Form alv_display
    text
    --> p1 text
    <-- p2 text
    FORM alv_display .
    *To build the field catalogue
    PERFORM build_fieldcatalog1.
    PERFORM build_fieldcatalog.
    *To build the ALV layout
    PERFORM build_layout.
    *To displayt the data in ALV report
    PERFORM display_alv_report.
    ENDFORM. " alv_display
    *& Form build_fieldcatalog
    text
    --> p1 text
    <-- p2 text
    FORM build_fieldcatalog1 .
    REFRESH t_fieldcat1.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '1'.
    wa_fieldcat-fieldname = 'VBELV'.
    wa_fieldcat-tabname = 'T_HEAD'.
    wa_fieldcat-seltext_l = 'Contract Number'.
    wa_fieldcat-Checkbox = 'X'.
    wa_fieldcat-edit = 'X'.
    wa_fieldcat-no_out = 'X'.
    wa_fieldcat-outputlen = '15'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '2'.
    wa_fieldcat-fieldname = 'POSNV'.
    wa_fieldcat-tabname = 'T_HEAD'.
    wa_fieldcat-seltext_l = 'Item Number'.
    wa_fieldcat-outputlen = '15'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '3'.
    wa_fieldcat-fieldname = 'VKUEGRU'.
    wa_fieldcat-edit = 'X'.
    wa_fieldcat-input = 'X'.
    wa_fieldcat-tabname = 'T_HEAD'.
    wa_fieldcat-drdn_hndl = '1'.
    wa_fieldcat-seltext_l = 'Reason for Cancel'.
    wa_fieldcat-outputlen = '25'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    endform.
    FORM build_fieldcatalog .
    REFRESH t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '4'.
    wa_fieldcat-fieldname = 'KUNNR'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Customer Number'.
    wa_fieldcat-outputlen = '15'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '5'.
    wa_fieldcat-fieldname = 'NAME1'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Customer Name'.
    wa_fieldcat-outputlen = '30'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '6'.
    wa_fieldcat-fieldname = 'VBELV'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Contract Number'.
    wa_fieldcat-outputlen = '20'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '7'.
    wa_fieldcat-fieldname = 'VBELN'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Invoice No.'.
    wa_fieldcat-outputlen = '10'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '8'.
    wa_fieldcat-fieldname = 'BELNR'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Acc doc Number'.
    wa_fieldcat-outputlen = '20'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '9'.
    wa_fieldcat-fieldname = 'WAERS'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Currency'.
    wa_fieldcat-outputlen = '15'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '10'.
    wa_fieldcat-fieldname = 'DMBTR'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-do_sum = 'X'. "SUM UPON DISPLAY
    wa_fieldcat-datatype = 'CURR'.
    wa_fieldcat-seltext_l = 'Amount'.
    wa_fieldcat-outputlen = '15'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '11'.
    wa_fieldcat-fieldname = 'DUEDATE'.
    wa_fieldcat-tabname = 'T_OUTPUT'.
    wa_fieldcat-seltext_l = 'Due Date'.
    wa_fieldcat-outputlen = '20'.
    APPEND wa_fieldcat TO t_fieldcat.
    data: lt_dropdown type lvc_t_drop,
    ls_dropdown type lvc_s_drop.
    First listbox (handle '1').
    ls_dropdown-handle = '1'.
    ls_dropdown-value = 'KG'.
    append ls_dropdown to lt_dropdown.
    ls_dropdown-handle = '1'.
    ls_dropdown-value = 'G'.
    append ls_dropdown to lt_dropdown.
    call method g_grid->set_drop_down_table
    exporting it_drop_down = lt_dropdown.
    ENDFORM. " build_fieldcatalog
    *& Form build_layout
    text
    --> p1 text
    <-- p2 text
    FORM build_layout .
    t_layout-no_input = 'X'.
    t_layout-colwidth_optimize = 'X'.
    ENDFORM. " build_layout
    *& Form display_alv_report
    text
    --> p1 text
    <-- p2 text
    FORM display_alv_report .
    g_repid = sy-repid.
    data g_keyinfo type SLIS_KEYINFO_ALV.
    g_keyinfo-HEADER01 = 'VBELV'.
    g_keyinfo-ITEM01 = 'VBELV'.
    g_keyinfo-HEADER02 = 'POSNV'.
    g_keyinfo-ITEM02 = 'POSNV'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_interface_check = 'I'
    i_callback_program = g_repid
    i_callback_pf_status_set = 'SET_STATUS'
    i_callback_user_command = 'USER_COMMAND'
    is_layout = gs_layout
    it_fieldcat = t_fieldcat[]
    i_default = ' '
    i_save = 'A'
    i_tabname_header = 'T_HEAD'
    i_tabname_item = 'T_OUTPUT'
    i_structure_name_header = v_headers_table
    i_structure_name_item = v_items_table
    is_keyinfo = g_keyinfo
    i_bypassing_buffer = 'X'
    TABLES
    t_outtab_header = t_head[]
    t_outtab_item = i_result
    t_outtab_item = t_output[]
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    REFRESH: t_fieldcat[].
    refresh t_fieldcat1[].
    ENDFORM. " display_alv_report
    form SET_STATUS using extab TYPE slis_t_extab.
    SET PF-STATUS 'ZEO_S1' .
    endform.
    *& Form Top_Of_Page
    Top_Of_Page event in ALV
    FORM top_of_page .
    DATA: t_header TYPE slis_t_listheader,
    wa_header TYPE slis_listheader.
    Title
    wa_header-typ = 'H'.
    wa_header-info = ' Write Off Worklist'.
    APPEND wa_header TO t_header.
    CLEAR wa_header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = t_header.
    ENDFORM. "Top_Of_Page
    *User Command for the button
    form user_command using r_ucomm type syucomm
    ls_selfield type SLIS_SELFIELD.
    Break-point.
    case r_ucomm.
    when 'EXEC'.
    data: begin of lt_cancel occurs 0.
    include structure ZCANCEL.
    data end of lt_cancel.
    Clear lt_cancel.
    Refresh lt_cancel.
    Data: ref1 type ref to cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = ref1.
    call method ref1->check_changed_data.
    loop at t_Head where VKUEGRU is not initial.
    if ( t_HEAD-VKUEGRU NE '1' ) or
    ( t_Head-VKUEGRU NE '2' ) or
    ( t_head-VKUEGRU NE '3' ).
    Clear t_head-vkuegru.
    message e000 with text-110.
    endif.
    lt_cancel-vbeln = t_head-vbelv.
    lt_cancel-posnr = t_head-posnv.
    lt_cancel-VKUEGRU = t_head-VKUEGRU.
    Append lt_cancel.
    Clear lt_cancel.
    Endloop.
    CALL FUNCTION 'ZSD_CNTR_CANCEL'
    TABLES
    zcancel = lt_cancel.
    message s000 .
    endcase.
    endform.
    Regards
    vasu

  • How to populate field catalogue fields in ALV using  dynamic internal table

    Hi All,
    Please let me know how to populate field catalogue fields in ALV using  dynamic internal table.
    I have created <dyn_table> using code below.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                     EXPORTING
                       it_fieldcatalog = g_t_ifc
                        it_fieldcatalog = g_t_fieldcat
                     IMPORTING
                        ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Now this  <dyn_table>  has fields like idoc no.,creation date ,
    segment field 1, segment field 2 etc..Now idoc no.,creation date  are static fields from table EDIDC. And segment field 1, segment field 2 etc are dynamic fields from table EDSAPPL.
    In my  ALV report I am getting the final layout properly but I am unable to move values to corresponding fields in the final layout shown.Please let me know how to populate these fields from different tables.
    I tried this way but its not working.
    SORT g_t_edid4 BY docnum.
      LOOP AT g_t_edidc INTO g_r_edidc.
        READ TABLE g_t_edid4 into g_r_edid4
                         WITH KEY docnum = g_r_edidc-docnum
                                        BINARY SEARCH.
        IF sy-subrc = 0.
          <dyn_wa> =  g_r_edid4-sdata.
         MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
       CLEAR g_r_edid4.
        ENDIF.
    MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.

    You have to assign each field to field symbol and then assign the value to that field symbol and asssign that field symbol to workarea field symbol.
    LOOP AT g_t_edidc INTO g_r_edidc.
    READ TABLE g_t_edid4 into g_r_edid4
    WITH KEY docnum = g_r_edidc-docnum
    BINARY SEARCH.
    IF sy-subrc = 0.
    ASSIGN COMPONENT 'SDATA' OF STRUCTURE <DYN_WA> TO <DYN_FLD>.
    <DYN_FLD> = g_r_edid4-sdata.
    " <dyn_wa> = g_r_edid4-sdata.
    " Assign each fields like this.
    " MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
    CLEAR g_r_edid4.
    ENDIF.
    " MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.
    Regards,
    Naimesh Patel

  • Need help on How to edit RDF file to  see fields

    Hi all ,
    Thank you all for being helping
    could please someone explain where and how to edit the RDF file to view the code and fields, sometimes we need extra fields to add in the RTF templates.
    And if I get XML file from EBS, on top of the page of xml file tags says <RAXINV>
    how can i able to see this RAXINV short name in EBS on particular application to view fields and other info reg report,that way I can see columns and tablenames by using Help- ->record history, and Diagonise that particular report.
    any help please
    vasu

    Hi Srinuk, I'm not sure what you mean?
    An EBS report (RDF) "root" tag will always start with the "module" name in the property pallete of the report itself. Your XML tags and nestings are a direct result of your data model groupings combined with whatever your layout is defined as?
    Looking at a record history within EBS only tells you what table the form is looking at and I can't see what this has to do with an EBS report definition unless I'm missing something in your question.
    You need to open the RDF to getting the data model to understand the XML tags.
    Rob.
    http://www.scnet.com.au

  • Quick Tip: How to create editable form fields | Acrobat X Tips & Tricks | Adobe TV

    A short tip that details how to create editable form fields using Acrobat X Std. or Pro.
    http://adobe.ly/wzXkmL

    I have created a form which will be filled out by customers and sent back to me via 'submit' button. What I am trying to figure out is when we receive the filled out form, is there any way to have it as a pdf. To clarify, when the form is filled out and sent, the receiver opens the email and attached is a non-editable pdf. This way the customers information is no longer editable.

Maybe you are looking for

  • Ipod touch 2nd gen. glitching out like crazy, any suggestions?

    IPod won't connect to itunes even after uninstalling and reinstalling the latest version of it, freezes frequently, will turn itself off, tilt sensors won't work anymore, sometimes screen will turn white, and stay that way until it runs itself out of

  • Calculating valuation basis for ALP (alternate payments) in Schema UT00

    Hello Experts! I have a requirement that I'm trying to fulfill with a PCR but thus far have been unsuccessful. In the standard schema UT00, rule U010 calculates the valuation bases according to IT0008. If you have two WTs in IT0008 it'll take both in

  • Can we use threads in Clusters?

    Hi, My application is previously running on Iplanet4 webserver. We are migrating it to weblogic application server for reducing load on the application. We want to utilise the weblogic clustering concept for load balancing. Now when we deploy our app

  • Creating New Material Type

    Hi, While creating new material types what things should be taken in to consideration? If i want to create it by using copy function which ref. material type we should select and why?.e.g. ZSCRAP- Scrap Material

  • Can't make phone calls on i6

    Initiated my new i6 after backing up from my 5c. When I try to make a phone call now I'm automatically redirected to an outside operator that's going to require me to use a credit card to make my call. Under Settings when I go to Phone it says my Pho