08-29-2008 12:06 PM
Hi ,
I am using the program RFUMSV00.After executing this program it generates the ALV output.But before executing if we need to change the lay out we can change the lay out by using the tab(Output list).In the out put list we can configure the lay out display.
So my problem is in the ALV List when you try to do the change layout,there is field called USER_FIELD_1,2,3.I want to change these field names and i need to populate the values for those fileds.
For this there is a BADI with name :RFIDIT_TAX_BADI_010(se19 implementation)
In the deffination we have 5 chaices: FI_TAX_BADI_010 RFUMSV00: Events for List Output Using ALV
FI_TAX_BADI_011 RFUMSV00: Event 'APPEND' for Line Item Lists
FI_TAX_BADI_012 RFUMSV00: Event 'GET bkpf LATE' during Selection
FI_TAX_BADI_013 RFUMSV00: Set Parameters for DME Tool (Tree Type UMS1)
FI_TAX_BADI_014 RFUMSV00: Field Catalog of Output Lists for ALV
FI_TAX_BADI_015 RFUMSV00: Event "END-OF-SELECTION" before Data File Crea
FI_TAX_BADI_016 RFUMSV00: Transfer All Tax Data
So in the above BADI's which BADI i can use for changing the USER_FIELD1,2,3.and which BADI CAN use for Getting the values for those fields.
I am not familear with BADIs,Can any body had idea about this.
It will be great full.
Thanks.
08-29-2008 1:21 PM
[BADI FI_TAX_BADI_011|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=badi+fi_tax_badi_011&cat=sdn_all]
Method APPEND_TAX_ITEM
when this BADI is called (just before adding item to internal table) you can change the values of structure RFUMS_TAX_ITEM (changing parameter CH_TAX_ITEM) in this structure are the fields USER_FIELD_*
Method SET_FLAGS
This method is used to activate the call of the previous method.
[BADI FI_TAX_BADI_014|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=badi+fi_tax_badi_014&adv=false&sortby=cm_rnd_rankvalue]
Method MODIFY_FIELDCAT
Here you will be able to modify the field catalog.
Regards
08-31-2008 8:57 PM
Hello Mohan
Raimond has spotted the right BAdI already (FI_TAX_BADI_014).
To create an implementation of this BAdI you can use the following procedure:
1.) Display BAdI in SE18.
2.) Create implementation for BAdI (SE18: menu Implementation -> Create => transaction SE19)
3.) Accept the name of the implementing class and double-click on the class name.
4.) Put your coding within method MODIFY_FIELDCAT.
On ERP 6.0 there is a sample implementation of this BAdI. The BAdI allows "Multiple-Use". Thus, you active BAdI implementation will be executed together with all other active implementations.
method IF_EX_FI_TAX_BADI_014~MODIFY_FIELDCAT.
* ...
* Report text element table and work area
DATA TEXTS TYPE STANDARD TABLE OF TEXTPOOL.
DATA WA_TEXTS TYPE TEXTPOOL.
* Text element determination variables
DATA: FKEY(30) TYPE C,
CONTENTS(132) TYPE C,
TEXT_S(10) TYPE C,
TEXT_M(20) TYPE C,
TEXT_L(40) TYPE C.
* Field catalog for ALV
DATA FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA WA_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.
DATA WA_TAB_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.
* Read text element from J_1HCOMM
READ TEXTPOOL 'J_1HCOMM' INTO TEXTS LANGUAGE SY-LANGU.
CHECK SY-SUBRC EQ 0.
* Organize/Determine the text (small/medium/long)
LOOP AT TEXTS INTO WA_TEXTS.
CLEAR WA_FIELDCAT.
CLEAR: FKEY, CONTENTS, TEXT_S, TEXT_M, TEXT_L.
SPLIT WA_TEXTS-ENTRY AT '-' INTO FKEY CONTENTS.
IF NOT CONTENTS IS INITIAL.
SPLIT CONTENTS AT ',' INTO TEXT_S TEXT_M TEXT_L.
MOVE: FKEY TO WA_FIELDCAT-FIELDNAME,
TEXT_S TO WA_FIELDCAT-SELTEXT_S,
TEXT_M TO WA_FIELDCAT-SELTEXT_M,
TEXT_L TO WA_FIELDCAT-SELTEXT_L.
APPEND WA_FIELDCAT TO FIELDCAT.
ENDIF.
ENDLOOP.
* Loop on field catalog to be change the column heading
LOOP AT FIELDCAT INTO WA_FIELDCAT.
READ TABLE CH_TAB_FIELDCAT
WITH KEY FIELDNAME = WA_FIELDCAT-FIELDNAME
INTO WA_TAB_FIELDCAT.
IF SY-SUBRC EQ 0.
MOVE: WA_FIELDCAT-SELTEXT_S TO WA_TAB_FIELDCAT-SELTEXT_S,
WA_FIELDCAT-SELTEXT_M TO WA_TAB_FIELDCAT-SELTEXT_M,
WA_FIELDCAT-SELTEXT_L TO WA_TAB_FIELDCAT-SELTEXT_L,
'X' TO WA_TAB_FIELDCAT-REPTEXT_DDIC,
'' TO WA_TAB_FIELDCAT-DDICTXT. " 729142
MODIFY CH_TAB_FIELDCAT FROM WA_TAB_FIELDCAT INDEX SY-TABIX.
ENDIF.
ENDLOOP.
endmethod.
Regards
Uwe