Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Document Flow Fields to visible

Former Member
0 Kudos

hi!

looking at the document flow details - is it possible to set more fields of the ALV to visible?

Structure used is document_flow_alv_struc , the field I like to display is in there. But how do I tell the ALV to actually display it to the user? It looks like in LDOCUMENT_FLOW_ALVF01, there is some setting done, but I did not found a reasonable enhancement way there.

Thanks a lot,

Roland

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos

The details ALV on the Document Flow is being generated from the subroutine ALV_DETAILS in the Include MV75FF04ALV. It gets all the fields from the structure DOCUMENT_FLOW_ALV_STRUC but makes only certain fields visible based on the hardcoded field names (bad coding)


* Hide fields which are not required for displaying
  LOOP AT lt_fieldcat ASSIGNING <ls_fieldcat>.
    <ls_fieldcat>-tech = 'X'.
    CASE <ls_fieldcat>-fieldname.
      WHEN 'RFMNG' OR 'MEINS' OR 'RFWRT' OR 'WAERS' OR 'STATUS' OR  "<<
           'MAKTX' OR 'MATNR' OR 'DOCNUM' OR 'ITEMNUM' OR 'DOCNUV' OR  "<<
           'ITEMNUV' OR 'ERDAT'.
        CLEAR <ls_fieldcat>-tech.
        CHECK NOT iv_selected_item IS INITIAL.
*       Special logic for accounting documents
        IF iv_selected_item-vbtyp_n CA vbtyp_buchhaltung.
          <ls_fieldcat>-tech = 'X'.
          CASE <ls_fieldcat>-fieldname.
            WHEN 'DOCNUM' OR 'WAERS' OR 'RFWRT' OR 'STATUS' OR 'ERDAT'.
              CLEAR <ls_fieldcat>-tech.
            WHEN 'DOCNUV'.
              CLEAR <ls_fieldcat>-tech.
              <ls_fieldcat>-coltext = text-h43.
          ENDCASE.
        ENDIF.
*       Special logic for delivery
        IF iv_selected_item-vbtyp_n EQ vbtyp_lino OR
           iv_selected_item-vbtyp_n EQ '*'.
          CASE <ls_fieldcat>-fieldname.
            WHEN 'RFWRT' OR 'WAERS'.
              <ls_fieldcat>-tech = 'X'.
          ENDCASE.
        ENDIF.
*       Special logic for CRM Opportunity
        IF iv_selected_item-vbtyp_n EQ vbtyp_opportunity.
          <ls_fieldcat>-tech = 'X'.
          CASE <ls_fieldcat>-fieldname.
            WHEN 'DOCNUM' OR 'ITEMNUM'.
              CLEAR <ls_fieldcat>-tech.
          ENDCASE.
        ENDIF.
    ENDCASE.
  ENDLOOP.

There isn't an opportunity for implicit enhancement here as entire code is in the Subroutine.

Regards,

Naimesh Patel