MR51 : add custom field in the alv list
Dear.
I need to add a custom field in the alv layout of MR51.
Do you know any exit in order to obtain this ?
Thanks.
Hi,
try this
I think there is no exits for same
copy program of MR51 and make z one and add filed what filed you want to add
Regards
kailas Ugale
Similar Messages
-
How to add a Field to the Result List in Activity
Hello Experts !
We are on CRM 7.0. I want to add a field to the Result List of Activity (Component: BT126S_APPT / View: ApptSR). This field is the address of the "Employee Responsible".
So, how can I add a field to the Result List? AET is not a relevant tool for us because we don't want to create an attribute it already exist in the BOL. We just have to enhance the result list with BOL existing attributes.
Also, after I add the field, I will need to populate my field with Data via some method.
Thanks in Advance to all !
Mariano.-
SAP.Hi Mariano,
The component was missing some technical data. Implement sap notes 1226612, 1363752, and then follow the manual procedure shown below.
u2022 Execute transaction SE11.
u2022 Choose the Radio button "Data Type" and enter value
"CRMST_QUERY_R_ACT_BTIL" in the Data Type field.
u2022 Click on "Change" button.
u2022 Position the cursor before the Includes added to this structure. Click
On the "+" button to add a new attribute.
u2022 Enter the following details in the newly added blank row.
Component: PERSON_RESP_LIST
Component Type: CRMT_PERSON_RESP_LIST.
u2022 Save the changes and activate the structure.
u2022 Add the "Employee Responsible" field to the View configuration.
u2022 Open the BSP application BT126S_APPT.
u2022 Double-click on the view BT126S_APPT/ApptSR in the left side panel.
u2022 Choose tab "Configuration" in right side panel.
u2022 Choose the right configuration by using the "Choose Configuration" button.
u2022 Click on the Edit button.
u2022 Add the "Employee Responsible" attribute from the "Available fields" list to "Displayed fields" list.
u2022 Save the changes
Regards
Krishna -
How to add a button on the ALV LIST pop up
Hi ,
Can any one help me to add a button on the ALV list which is a pop up using ABAP Objects.
Thanks in advance.
Regards,
Kavya.HI ,
I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list but still I am unable to get any additional button on the output ALV popup.
Please help.
Regards,
Kavya. -
How can i add Custom fields into the
Dear Experts
We have Ecc6.0 system,
How can i add Custom fields into the Infotype Screen(PA30),i heard that we do it by PM01 Tcode.
But in PM01 i am unable to find the enhance infotype tab.
How can i do it ....pls help.....
Regards
SajidHi,
Do it thru the third tab : Single Screen.
There write down the infotype number (e.g. 0022) and say generate objects.
Regards,
Dilek -
Add custom field in the F4 help for selecting source field in tcode FMDER
HI,
I an working in FUND MANAGEMENT, i want to add custom field in the F4 help for selecting source field in t-code FMDERIVE.
How this possible.
Regards,
PankajOK
-
How to add custom fields to the sap standard program ukm_bp_display
How to add new custom fields to the sap standard program ukm_bp_display .
could u please any one help me on this?Hello Kumar,
You have to modify below structure, as this structure is providing the field catalog for output display (ALV).
Here you can see there are a lot of include structures, so if you want to add fields in the output display you can add those fileds as an append structure to any of the below mentioned structures (Like ukm_s_account, ukm_s_bp_cms_sgm etc as per your requiremnt and positon at which you need to dispaly your fields.)
DATA: BEGIN OF gt_grid_alv OCCURS 0.
partner LIKE but000-partner,
credit_sgmnt LIKE ukmbp_cms_sgm-credit_sgmnt.
INCLUDE STRUCTURE ukm_s_account.
INCLUDE STRUCTURE ukm_s_bp_cms_sgm.
DATA: credit_sgmnt_txt LIKE ukmcred_sgm0t-credit_sgmnt_txt.
Gruppe Vector
INCLUDE STRUCTURE ukm_s_bp_vector.
Gruppe OBL = Obligo
include structure UKM_S_BP_CMS_MALUSDSP_OUT.
INCLUDE STRUCTURE ukm_s_display_segment.
INCLUDE STRUCTURE ukm_s_bp_cms.
INCLUDE STRUCTURE bus000_dat.
*DATA: icon(4).
Gruppe RAST (Raster)
DATA:
rast01 LIKE ukm_s_display_segment-AMOUNT_GRID,
rast02 LIKE ukm_s_display_segment-AMOUNT_GRID,
rast03 LIKE ukm_s_display_segment-AMOUNT_GRID,
rast04 LIKE ukm_s_display_segment-AMOUNT_GRID,
rast05 LIKE ukm_s_display_segment-AMOUNT_GRID,
rast06 LIKE ukm_s_display_segment-AMOUNT_GRID.
DATA: rast2_6 LIKE ukm_s_display_segment-AMOUNT_GRID.
"Summe raster 2 bis 6
DATA: END OF gt_grid_alv.
Another way is you can go to SE38, and you can create implicit enhancements.One enhancement point is available here in this required area. so create an implementation and add your fileds with data types.This way is also simple.
Hope this will solve yiour problems.
Regards,
Antony Thomas -
Add custom field in the selection screen for shopping cart monitor report
Hello,
refering to the notes 458591 an 672960, in order to add custom field at item level, we get the structure INCL_EEW_PD_ITEM_CSF.
But this doesnt make it appear on the "Shopping Cart Monitor Report" selection screen.
So should I try adding it in the existing interface of the badi bbp_sc_mon ?hello Yann,
ok I will implement that. Is it possible to change the interface of the badi method to include more data if we want to check the role of the user who is executing the shopping cart monitor report and accordingly do the settings of field display ? Or calling a function module inside the method to get the attributes of sy-uname would be easier?
rita -
Add custom fields to the business partner (UKM_BP) thru BADI
Hi
I want to know how to add Additional business partner attributes(custom fields) to Business partner (Transaction : UKM_BP)
I also added the custom fields to structure UKM_S_BP_CUSTOMER_EXTENSION in the method FILL_FIELDS of BADI UKM_BP_ADD_FIELDS, But nothign is populating on the screen of UKM_BP after activating the below BADI's with SAP provided sample code with above structure.
there are 2 BADI's for this requirements but it doesn't any thing about the screens
UKM_BP_ADD_FIELDS
UKM_EV_FORMULA
Please let me know the detailed steps other than activating these BADI's with sample code by SAP.
Thanks
GoviThanks for your reply
BADI - UKM_BP_ADD_FIELDS
Documentation of this BADI shows as follows...
With this BAdI, you can define additional business partner attributes that you define in a business partner master record and want to use as fields in the formula editor.
To use the new fields, implement the BAdI: Formula Parameters and Functions (UKM_EV_FORMULA)
Methods of this BAdI:
FILL_FIELDS
To provide additional fields for the formula editor
FILL_ADD_INFOS and SAVE_ADD_INFOS
To define additional information for the following data in table form:
Collateral
Negative event
Check exceptions
Credit insurance
I enhanced the structure(UKM_S_BP_CUSTOMER_EXTENSION) with new custom fields from the badi UKM_BP_ADD_FIELDS but there is documentation for creating the new screen to place those new fileds i created on transaction UKM_BP.
I have looked at BDT Business data toolset
http://help.sap.com/saphelp_crm50/helpdata/en/2f/696d360856e808e10000009b38f839/frameset.htm
but i didn't get any idea ...
Can you please elaborate and let me know how to do this for my requirement?
Thanks
Govi -
How to add custom field to the task via CSOM?
Hello!
I'm trying to add custom fields to my programmatically created task in project 2013. Tasks are created. Then I get them and load custom fields by:
DraftProject projCheckedOut = tstProj.CheckOut();
projContext.Load(projCheckedOut.Tasks);
projContext.ExecuteQuery();
foreach (var task in projCheckedOut.Tasks)
projContext.Load(task.CustomFields);
projContext.ExecuteQuery();
But the each CusomFieldCollection object has only 1 field (Health, because it have a default value and created automatically). But when I load my project in Project professional i saw more than 1 field, but they are empty.
Then I tried to add a new custom field to each CusomFieldCollection of each task.
var newField = new CustomFieldCreationInformation();
newField.FieldType = CustomFieldType.TEXT;
newField.Name = "F_1";
newField.Description = "test description";
task.CustomFields.Add(newField);
task.CustomFields.Update();
New field added to the collection, but when I update the project and publish it nothing is happened.
How to add a custom field to the each task and set it value?
Or how to attach enterprise task custom field to my tasks.
I'm using Microsoft.ProjectServer.Client.Hi
Hope the below posts are of some helpful for you
http://social.msdn.microsoft.com/Forums/en-US/d79f22f2-7fd2-46af-b778-e189c8611120/use-csom-to-update-projects-custom-fields?forum=project2010custprog
http://msdn.microsoft.com/en-us/library/microsoft.projectserver.client.project.setcustomfieldvalue.aspx
Thanks
Geeth
Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful. -
I wnat to add new fieldtext in the alv list output plz tell me
hi,
i whant add new fieldtext in the list output, plz tell me where can i modify it.
CORRECTIONS
DATE CORRECTION NOTE AUTHOR DESCRIPTION
09.03.2001 L9CK045451 0388404 XSC Wrong list output for multiple Os
05.06.2001 AL0K023393 0410219 Lud Wrong keydate for search with
Pchbegda and pchendda.
22.04.2004 S6BK024775 730486 PS Too many selection parameters in
header
19.06.2006 S6BK035494 956731 JF No sorting by qualification
REPORT RHPK_FIND_PERS_WITH_EXPIRED_QU MESSAGE-ID PQ.
DATA AUFRUF(8).
TABLES : OBJEC, GDSET.
DATA LIST.
DATA MARKFIELD(1) TYPE C.
ALV_POOL
TYPE-POOLS SLIS.
INCLUDES
INCLUDE .
INCLUDE RHPEINI0.
TABLES
DATA: orgeh_BUFFER like hrobject OCCURS 1 WITH HEADER LINE.
DATA: OBJECTS LIKE HRSOBID OCCURS 1 WITH HEADER LINE.
DATA: h_OBJEC LIKE objec OCCURS 0 WITH HEADER LINE.
DATA: pers_objects LIKE HRSOBID OCCURS 1 WITH HEADER LINE.
DATA: QUALI_TAB LIKE QUALI_PROF OCCURS 1 WITH HEADER LINE.
DATA: PERSONS LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: H_PERSONS LIKE HRPE_PROFL OCCURS 1 WITH HEADER LINE.
DATA: LIST_OUTPUT LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: BOOK_EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: PLAN_EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA H_SUITED LIKE DYNP_PCRIT-SUITED.
DATA: O_COLOR LIKE STREEATTR-COLOR.
DATA: O_INTENSIV LIKE STREEATTR-INTENSIV.
DATA SHOW_KEY.
DATA EVENT.
DATA: HTEXT LIKE P1000-STEXT.
DATA: EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: COLLECTED_EVENTS LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: SUBTY_TAB LIKE HRPE_OTYPE_SUBTY OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF HIDE_STRU,
PERSTYPE LIKE HROTYPE-OTYPE,
PERSOBID LIKE HRSOBID-SOBID,
PERSTXT LIKE PERSQ_PROF-STEXT,
SCALE_ID LIKE HRPE_PROFQ-SCALE_ID,
TRAININGTYPE LIKE HRP1000-OTYPE,
TRAININGID LIKE HRP1000-OBJID,
TRAININGSTXT LIKE HRP1000-STEXT,
QUALID LIKE QUALI_PROF-QUALID,
QUALTEXT LIKE QUALI_PROF-QUALSTXT,
END OF HIDE_STRU.
DATA: BEGIN OF EXTAB OCCURS 10,
FCODE LIKE RSMPE-FUNC,
END OF EXTAB.
DATA: CURRENT_QUALID LIKE QUALI_PROF-QUALID.
DATA: CURRENT_TRAININGSID LIKE HRP1000-OBJID.
DATA: CURRENT_TRAININGTYPE LIKE HRP1000-OTYPE.
DATA: SUBRC LIKE SY-SUBRC.
VARIABLES
DATA: OBJID LIKE P1000-OBJID.
DATA: H_LINE_COUNT TYPE I.
DATA: H_TABIX1 LIKE SY-TABIX.
ALV-Variables
DATA: alv_events_line TYPE slis_alv_event. "header line
DATA ALV_EVENTS TYPE SLIS_T_EVENT.
DATA GT_ALV_LIST_TOP_OF_LIST TYPE SLIS_T_LISTHEADER.
DATA: gt_events TYPE SLIS_T_EVENT.
DATA G_REPID LIKE SY-REPID.
DATA G_VARIANT LIKE DISVARIANT.
DATA ALV_USERCOMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
DATA G_USERCOMMAND_FOR_RANKINGLIST TYPE SLIS_FORMNAME VALUE
'USER_COMMAND_FOR_RANKINGLIST'.
DATA ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: ALV_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
DATA: Help_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
begin of Dynpro 5020 - POPUP: WEITER
DATA: OK_CODE_5020 LIKE SY-UCOMM.
DATA: NO_ORG. "if no org selected
DATA: H_TABIX LIKE SY-TABIX.
begin of Dynpro 20nn - Header
TABLES: DYNP_RHPP.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-005.
PARAMETERS:
H_EVENTS LIKE DYNP_RHPP-GEN_TRAIN, "with training sugg
H_QUAL LIKE DYNP_RHPP-EXPIRED_QUAL. "with Qual
SELECTION-SCREEN END OF BLOCK B3.
INITIALIZATION
INITIALIZATION.
PERFORM READ_T77S0_PARAMETERS_FOR_PE.
get user parameters/Planvariante und Beginndatum setzen:
PCHOTYPE = $ORGEH.
CALL FUNCTION 'RHP0_USER_PARAMETERS_GET'
EXPORTING
FILL_IF_INITIAL = 'X'
IMPORTING
PLVAR = PCHPLVAR
BEGDA = PCHBEGDA
endda = Pchendda "Correction 0410219
WITH_KEY = SHOW_KEY
SUBSTITUTE =
ESSENTIAL = only_essential
ORG_UNIT = PCHOBJID-LOW
EXCEPTIONS
OTHERS = 0.
PCHBEGDA = LOW_DATE. "Correction note: 0410219 / AL0K023393
get menu text for key on/off
PERFORM USER_MENU_TEXT_KEY(SAPLRHP0) USING G_MENU_TEXT_KEY.
start-of-selection
START-OF-SELECTION.
terminate the selection if objid isn't given
READ TABLE PCHOBJID INDEX 1 TRANSPORTING NO FIELDS.
IF SY-SUBRC <> 0
AND PCHOBJID IS INITIAL.
PCHOBJID-SIGN = 'I'.
PCHOBJID-OPTION = 'EQ'.
PCHOBJID-LOW = '00000001'.
APPEND PCHOBJID.
NO_ORG = TRUE.
ELSE.
NO_ORG = FALSE.
ENDIF.
GET OBJEC.
terminate the selection if objid isn't given
IF NO_ORG = TRUE.
EXIT.
ENDIF.
OBJECTS-PLVAR = PCHPLVAR.
OBJECTS-OTYPE = PCHOTYPE.
OBJECTS-SOBID = OBJEC-REALO.
APPEND OBJECTS.
Für das lesen der Organisationseinheit
h_OBJEC-PLVAR = OBJEC-PLVAR.
h_OBJEC-OTYPE = OBJEC-OTYPE.
h_OBJEC-OBJID = OBJEC-objid.
append h_objec.
Read table h_objec index 1 transporting no fields.
if sy-subrc = 0.
Fill Buffer
orgeh_BUFFER = h_OBJEC.
orgeh_BUFFER[] = h_OBJEC[].
CALL FUNCTION 'RH_TEXT_BUFFER_FILL'
TABLES
OBJECTS = orgeh_BUFFER.
Loop at h_OBJEC.
H_TABIX = SY-TABIX.
Read text of organisation
CALL FUNCTION 'RH_READ_OBJECT'
EXPORTING
PLVAR = h_OBJEC-plvar
OTYPE = h_OBJEC-otype
OBJID = h_OBJEC-OBJID
IMPORTING
OBEG = h_objec-begda
OEND = h_objec-endda
SHORT = short
STEXT = h_OBJEC-stext
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
modify h_OBJEC index H_TABIX.
ENDIF.
endloop.
endif.
end-of-selection
END-OF-SELECTION.
read objects of the organizational unit
OBJID = OBJECTS-SOBID.
CALL FUNCTION 'RHPH_PICK_UP_PERSONS'
EXPORTING
BEGDA = PCHBEGDA "Correction 0410219
ENDDA = PCHENDDA "Correction 0410219
STATUS = '1'
WITH_STEXT = 'X'
TABLES
OBJECTS = OBJECTS
PERSONS = H_PERSONS
EXCEPTIONS
UNDEFINED = 1
OTHERS = 2.
IF SY-SUBRC = 0.
prepare objects !
objects-otype = h_persons-ttype.
objects-sobid = h_persons-tobid.
append objects.
ELSE.
EXIT.
ENDIF.
CLEAR OBJECTS. REFRESH OBJECTS.
prepare sel_objects !
pers_objects-PLVAR = PCHPLVAR.
LOOP AT H_PERSONS.
pers_objects-OTYPE = H_PERSONS-TTYPE.
pers_objects-SOBID = H_PERSONS-TOBID.
APPEND pers_objects.
ENDLOOP.
sort objects and delete adjacent duplicates
SORT Pers_OBJECTS BY PLVAR OTYPE SOBID.
DELETE ADJACENT DUPLICATES FROM Pers_OBJECTS COMPARING PLVAR OTYPE
SOBID.
CALL FUNCTION 'RHPK_FIND_PERS_WITH_EXPIRED_Q'
EXPORTING
PLVAR = PCHPLVAR
CHECK_BEGDA = PCHBEGDA
CHECK_ENDDA = PCHENDDA
SUBTY = $ownsb "'B032'
only_essential =
target_otype =
target_ap_iea =
TABLES
IMP_PER_TAB = pers_objects
QUALI_TAB = QUALI_TAB
PERSONS = LIST_OUTPUT
altq_tab =
EXCEPTIONS
NO_QUALIFICATION = 1
NO_PERSON_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
100% case
READ TABLE pers_objects INDEX 1 TRANSPORTING NO FIELDS.
IF SY-SUBRC = 0.
sort pers_objects by otype sobid.
check the selected persons: if org.unit was selected !
Loop at pers_objects.
H_TABIX = SY-TABIX.
READ TABLE LIST_OUTPUT WITH KEY OTYPE = pers_objects-OTYPE
SOBID = pers_objects-SOBID
BINARY SEARCH.
IF SY-SUBRC <> 0.
person doesn't belong to the selected org.unit
DELETE LIST_OUTPUT INDEX H_TABIX.
ENDIF.
ENDLOOP.
ENDIF. "org.unit check needed ?
end-of-selection.
sort h_objec by otype objid.
sort list_output by otype sobid.
sort h_persons by ttype tobid.
ALV-Liste aufbauen
loop at h_objec.
loop at h_persons where otype = h_objec-otype "XSC
and sobid = h_objec-objid. "XSC
Read table list_output with key
otype = h_persons-ttype
sobid = h_persons-tobid
binary search.
if sy-subrc = 0.
h_tabix1 = sy-tabix.
while sy-subrc = 0.
clear alv_output. "XSC
ALV_OUTPUT-otype = h_objec-otype.
ALV_OUTPUT-sobid = h_objec-objid.
ALV_OUTPUT-stext = h_objec-stext.
ALV_OUTPUT-Ptype = LIST_OUTPUT-otype.
ALV_OUTPUT-pobid = LIST_OUTPUT-sobid.
ALV_OUTPUT-pshort = LIST_OUTPUT-short.
ALV_OUTPUT-ptext = LIST_OUTPUT-stext.
ALV_OUTPUT-qualid = LIST_OUTPUT-qualid.
ALV_OUTPUT-qualstxt = LIST_OUTPUT-qualstxt.
ALV_OUTPUT-expbegda = LIST_OUTPUT-vbegda.
ALV_OUTPUT-expendda = LIST_OUTPUT-vendda.
PERFORM FIND_TRAINING TABLES QUALI_TAB EVENT_TAB COLLECTED_EVENTS
USING $PLVAR $GDATE H_EVENTS H_QUAL.
IF NOT EVENT_TAB[] IS INITIAL.
READ TABLE COLLECTED_EVENTS WITH KEY
QUALID = LIST_OUTPUT-QUALID.
IF SY-SUBRC = 0.
ALV_OUTPUT-ICON_S_EVENTS = ICON_BOOKEVENT.
endif.
ENDIF.
Append ALV_OUTPUT.
h_tabix1 = h_tabix1 + 1.
READ TABLE list_output INDEX h_tabix1
COMPARING otype sobid.
endwhile.
endif.
endloop.
endloop.
check if indicator for qualification view is set
IF h_qual = 'X'. "note 956731
SORT alv_output by qualid OTYPE SOBID ptype pobid "note 956731
expbegda expendda. "note 956731
ELSE. "note 956731
SORT alv_output by OTYPE SOBID ptype pobid qualid expbegda expendda.
ENDIF. "note 956731
DELETE ADJACENT DUPLICATES FROM ALV_OUTPUT COMPARING OTYPE SOBID ptype
pobid qualid expbegda expendda.
stext_AQ und icon-Feld noch nicht gefüllt
perform PREPARE_TOP_OF_LIST.
perform Build_FIELDCAT using GT_FIELDCAT[] H_EVENTS.
perform ALV_LAYOUT USING alv_layout.
G_REPID = SY-REPID.
G_VARIANT-REPORT = G_REPID.
PERFORM EVENTTAB_BUILD USING GT_EVENTS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = 'X'
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = ALV_USERCOMMAND
I_STRUCTURE_NAME = 'HRPDV_EXPIRED_Q'
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
IT_EVENTS = GT_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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ALV_OUTPUT
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.
*& Form FIND_TRAINING
text
-->P_QUALI_TAB text
-->P_EVENT_TAB text
-->P_$PLVAR text
-->P_GDATE text
-->P_H_EVENT text
-->P_H_QUAL text
FORM FIND_TRAINING TABLES P_QUALI_TAB STRUCTURE QUALI_TAB
P_EVENT_TAB STRUCTURE EVENT_TAB
P_COLLECTED_EVENTS STRUCTURE COLLECTED_EVENTS
USING VALUE(P_$PLVAR) LIKE P1000-PLVAR
VALUE(P_GDATE) LIKE P1000-GDATE
VALUE(P_H_EVENT) TYPE ANY
VALUE(P_H_QUAL) TYPE ANY.
IF NOT P_H_EVENT IS INITIAL.
READ TABLE EVENT_TAB INDEX 1 TRANSPORTING NO FIELDS.
IF SY-SUBRC <> 0.
CLEAR P_EVENT_TAB. REFRESH EVENT_TAB.
CLEAR P_COLLECTED_EVENTS. REFRESH P_COLLECTED_EVENTS.
IF EVENT = FALSE.
EVENT = TRUE.
ELSE.
EVENT = FALSE.
ENDIF.
CALL FUNCTION 'RHPH_FIND_TRAINING_FOR_QUAL'
EXPORTING
PLVAR = PCHPLVAR
GDATE = SY-DATUM
GET_NAME = 'X'
TABLES
QUALI_TAB = QUALI_TAB
TO_Q_TAB = EVENT_TAB
EXCEPTIONS
NO_QUALIFICATION = 1
NO_OBJECT_FOUND = 2
TECHNICAL_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
the found qualifications are picked up into table event_tab
ENDIF.
IF SY-SUBRC = 1.
MESSAGE S015. "Zu den Eingaben wurden keine Daten gefunden
ENDIF.
IF SY-SUBRC > 2.
EXIT.
ENDIF.
collect events when there are double.
Veranstaltungen kollektieren, Können mehrfach auftauchen, da
verschiedenen Qualifikationen von gleichen Veranstaltungen vermittelt
LOOP AT P_EVENT_TAB INTO P_COLLECTED_EVENTS.
APPEND P_COLLECTED_EVENTS.
ENDLOOP.
SORT P_COLLECTED_EVENTS BY QUALID STEXT.
ENDIF.
ENDIF.
ENDFORM. " FIND_TRAINING
*& Form PREPARE_TOP_OF_LIST
text
--> p1 text
<-- p2 text
FORM PREPARE_TOP_OF_LIST.
DATA ALV_TOP_OF_LIST TYPE SLIS_LISTHEADER. "typ, key, info
DATA STEXT LIKE HRPDV_SUCCESSOR_VIEW-TTEXT.
DATA P_SUBRC LIKE SY-SUBRC.
DATA P_STEXT LIKE T777O-OTEXT.
DATA l_tabix like sy-tabix value 0.
DATA: h_counter TYPE i. "note 730486
ALV_TOP_OF_LIST-TYP = 'H'.
ALV_TOP_OF_LIST-INFO = TEXT-REQ.
APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
Organisationseinheit
ALV_TOP_OF_LIST-typ = 'S'.
Read text for organisationunit
PERFORM READ_TEXT_OTYPE_T777O(SAPLRHP0) USING SY-LANGU $ORGEH
P_STEXT P_SUBRC.
ALV_TOP_OF_LIST-key = P_STEXT.
fill buffer for read organisation-text
CALL FUNCTION 'RH_TEXT_BUFFER_FILL'
EXPORTING
CHECK_STRU_AUTH = 'X'
WITH_EXTINT = ' '
TABLES
OBJECTS = OBJECTS.
loop at objects for multipleselection
clear h_counter. "note 730486
LOOP AT OBJECTS.
$OBJID = OBJECTS-SOBID.
CALL FUNCTION 'RH_READ_OBJECT'
EXPORTING
PLVAR = OBJECTS-PLVAR
OTYPE = OBJECTS-OTYPE
OBJID = $OBJID
IMPORTING
SHORT = short
STEXT = STEXT
EXCEPTIONS
NOT_FOUND = 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.
IF h_counter >= 15. "note 730486
MOVE '( ... )' TO ALV_TOP_OF_LIST-INFO. "note 730486
APPEND ALV_TOP_OF_LIST TO gt_alv_list_top_of_list.
"note 730486
EXIT. "note 730486
ENDIF. "note 730486
CONCATENATE $ORGEH OBJECTS-SOBID STEXT INTO
ALV_TOP_OF_LIST-INFO SEPARATED BY SPACE.
APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
CLEAR ALV_TOP_OF_LIST.
ALV_TOP_OF_LIST-typ = 'S'.
l_tabix = l_tabix + 1.
ADD 1 TO h_counter. "note 730486
ENDLOOP.
CLEAR ALV_TOP_OF_LIST.
ALV_TOP_OF_LIST-TYP = 'S'.
ALV_TOP_OF_LIST-key = TEXT-003.
WRITE PCHBEGDA TO ALV_TOP_OF_LIST-INFO.
APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
clear ALV_TOP_OF_LIST-INFO.
ALV_TOP_OF_LIST-key = TEXT-004.
WRITE PCHENDDA TO ALV_TOP_OF_LIST-INFO.
Append ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
ENDFORM. " PREPARE_TOP_OF_LIST
*& Form BUILD_FIELDCAT
text
-->P_GT_FIELDCAT[] text
FORM BUILD_FIELDCAT USING P_GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
P_H_EVENTS.
DATA: WA_FIELDCAT LIKE LINE OF P_GT_FIELDCAT.
DATA: P_REPNAME LIKE SY-REPID,
L_TABIX LIKE SY-TABIX. "local variable for sy-tabix.
P_REPNAME = SY-REPID.
Erstellen des Feldkataloges
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = P_REPNAME
I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'HRPDV_EXPIRED_Q'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = PRONAME
CHANGING
CT_FIELDCAT = P_GT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 0
PROGRAM_ERROR = 0
OTHERS = 0.
LOOP AT P_GT_FIELDCAT INTO WA_FIELDCAT.
l_tabix = sy-tabix.
CASE WA_FIELDCAT-FIELDNAME.
when 'OTYPE'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'SOBID'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'STEXT'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'PTYPE'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'POBID'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'PSHORT'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'PTEXT'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'QUALID'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'QUALSTXT'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'EXPBEGDA'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'EXPENDDA'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'ICON_S_EVENTS'.
IF P_H_EVENTS IS INITIAL.
WA_FIELDCAT-NO_OUT = 'X'.
else.
WA_FIELDCAT-DDICTXT = 'X'.
endif.
ENDCASE.
MODIFY P_GT_FIELDCAT FROM WA_FIELDCAT INDEX l_tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCAT
*& Form ALV_LAYOUT
text
-->P_L_ALV_LAYOUT text
FORM ALV_LAYOUT USING P_ALV_LAYOUT TYPE slis_layout_alv.
build layout
P_LAYOUT-BOX_FIELDNAME = 'MARK_X'. "fieldname for checkbox
P_ALV_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
P_ALV_LAYOUT-BOX_TABNAME = ALV_OUTPUT. "tabname for checkbox
p_ALV_layout-info_fieldname = 'ALV_COLOR'.
ENDFORM. " ALV_LAYOUT
FORM eventtab_build USING
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-NAME.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDFORM. "EVENTTAB_BUILD
*FORM TOP_OF_PAGE
FORM TOP_OF_PAGE. "#EC CALLED
NEW-PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_ALV_LIST_TOP_OF_LIST[].
ENDFORM. "TOP_OF_PAGE
FORM USER_COMMAND *
USER_COMMAND for the list of successor view *
--> r_ucomm *
--> rs_selfield *
FORM USER_COMMAND USING ALV_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD. "#EC CALLED
DATA: SELECTED_LINE LIKE HRPDV_expired_q.
DATA: SOBID_QUA LIKE P1000-OBJID.
DATA: LT_PERS_TAB LIKE HRSOBID OCCURS 0 WITH HEADER LINE.
CASE ALV_UCOMM.
WHEN '&IC1'. "per Doppelklick auswählen
READ TABLE ALV_OUTPUT INDEX
RS_SELFIELD-TABINDEX INTO SELECTED_LINE.
CASE RS_SELFIELD-FIELDNAME.
WHEN 'POTYPE' or 'POBID' or 'PTEXT' or 'OTYPE' or 'SOBID' or
'STEXT' or 'QUALID' or 'QUALSTXT' or 'EXPBEGDA' or 'EXPENDDA'.
READ TABLE ALV_OUTPUT INDEX RS_SELFIELD-TABINDEX INTO
Help_output.
IF SY-SUBRC <> 0.
MESSAGE S027. "Bitte gültige Zeile auswählen
EXIT.
Endif.
IF ALV_OUTPUT-SOBID IS INITIAL.
MESSAGE S015. "Zu den Eingaben wurden keine Daten gefunden
ELSE.
converte the variable because of the different types
SOBID_QUA = SELECTED_LINE-SOBID_QUA.
CALL FUNCTION 'RHPP_SHOW_PROFILE'
EXPORTING
PLVAR = pchplvar
OTYPE = SELECTED_LINE-PTYPE "XSC
OBJID = SELECTED_LINE-POBID "XSC
BEGDA = PCHBEGDA
ENDDA = PCHENDDA
MAINTAIN = ' '
EXCEPTIONS
NO_AUTHORITY = 1
NOT_FOUND = 2
OTHERS = 3.
CASE SY-SUBRC.
WHEN 0.
All right.
WHEN 1.
MESSAGE S015.
Zu Ihren Eingaben konnten keine Daten gefunden werden!
WHEN 2.
MESSAGE E000.
Dazu haben sie keine berechtigung!
WHEN OTHERS.
MESSAGE E008.
Es ist ein unvorhergesehener Fehler aufgetreten.
ENDCASE. "sy-subrc.
CLEAR ALV_OUTPUT.
ENDIF. "IF ALV_OUTPUT-SOBID IS INITIAL.
CLEAR ALV_OUTPUT-SOBID.
when 'ICON_S_EVENTS'.
IF SELECTED_LINE-ICON_S_EVENTS IS INITIAL.
MESSAGE S027. "Bitte gültige Zeile auswählen
EXIT.
ENDIF.
CLEAR LT_PERS_TAB.
REFRESH LT_PERS_TAB.
LT_PERS_TAB-PLVAR = pchPLVAR.
LT_PERS_TAB-OTYPE = SELECTED_LINE-PTYPE. "XSC
LT_PERS_TAB-SOBID = SELECTED_LINE-POBID. "XSC
APPEND LT_PERS_TAB.
SOBID_QUA = SELECTED_LINE-QUALID.
CALL FUNCTION 'RHPP_SHOW_SUGGEST_EVENTS'
EXPORTING
P_PLVAR = pchPLVAR
P_SOBID_QUA = SOBID_QUA
P_PROFCY_REQ = SELECTED_LINE-RATING_REQ
P_GDATE = sy-datum
TABLES
EVENT_TAB =
PERS_TAB = LT_PERS_TAB.
endcase.
CLEAR SELECTED_LINE.
ENDCASE. "case sy-ucomm
CLEAR SY-UCOMM.
ENDFORM. "USER_COMMANDPls be more specific in your question. If you want to include an extra field in your alv output, then read the field catalog table you created through "Reuse_alv_fieldcatalog_merge" and then add an extra entry in it giving the details of the field you want to add.. and then call the "resuse_alv_grid_display",
Hope this helps. To be able to help you in a better way, kindly revert with any specific issue.
Reward if helpful,
Karan -
How to add check box in the ALV list
dear Experts,
i have a requirement.
i want show the check boxes in my ALV list.
can u please give the solution.
thanksTYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
SEL, " add a single character field in the final output table
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort type slis_t_sortinfo_alv,
wa_sort like line of it_sort.
DATA: BEGIN OF it_flight_sel OCCURS 0,
SEL,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight_sel.
data: wa_flight like it_flight.
In the layout set give the name of the field
whose checkbox will be created ( SEL as it has 1 char only )
layout-box_fieldname = 'SEL'.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
wa_sort-fieldname = 'CARRID'.
wa_sort-group = 'UL'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
loop at it_flight into wa_flight.
if wa_flight-Sel EQ 'X'.
collecting records in table it_flight_sel to process further
append wa_flight to it_flight_sel.
clear wa_flight.
TYPE-POOLS: slis.
*---internal tables
DATA: BEGIN OF it_flight OCCURS 0,
SEL, " add a single character field in the final output table
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight,
*--internal tables for alv
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat,
layout TYPE slis_layout_alv,
it_sort type slis_t_sortinfo_alv,
wa_sort like line of it_sort.
DATA: BEGIN OF it_flight_sel OCCURS 0,
SEL,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight_sel.
data: wa_flight like it_flight.
In the layout set give the name of the field
whose checkbox will be created ( SEL as it has 1 char only )
layout-box_fieldname = 'SEL'.
*---start-of-selection .
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
*----get data
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
UP TO 20 ROWS.
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
wa_sort-fieldname = 'CARRID'.
wa_sort-group = 'UL'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
wa_sort-fieldname = 'CONNID'.
wa_sort-subtot = 'X'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
clear wa_sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
loop at it_flight into wa_flight.
if wa_flight-Sel EQ 'X'.
collecting records in table it_flight_sel to process further
append wa_flight to it_flight_sel.
clear wa_flight.
Please follow the code. -
Required BADI to add custom fields in the Basic Data screen in MM01
Hi,
I got a requirement like this. I have to add 3 custom fields and one button in the standard transaction i.e., MM01, MM02, MM03. There is one field like producu heirarchy in the Basic Data in that field i will enter some values i want to display the description of those values in the corresponding field for that i need to create 4 custom field. We can create this by breaking the Developer Access Key but instead of that can i get any BADI to add the our custom code to display those fields. I want to add those fields in Basic Data View in the transaction MM01, MM02, MM03. I serached in SPRO but i couldn't find the respective BADI.
Pls suggest if any BADI is there for this.
Thanks in advance.Hi,
The list of BADI's are as under
WRF_DISCONT_PARAMS_I BAdI: Parameters in Fashion Discontinuation
WRF_DISCONT_FACT_E BAdI: Follow-Up Actions in Discontinuation
WRF_DISCONT_CHECKS_I BAdI: Scope of Check in Material Reorganization
MG_MASS_NEWSEG User-Specific Fields & Segments in Mass Maintenance
MATGRP_SKU_UPD BAdI for Article Hierarchy Connection
CDT_CHECK_MATERIAL Checks for Existence of a Material in a CDT
BADI_MM_MATNR Modification-Free Archiving Enhancement of MM_MATNR
BADI_MAT_F_SPEC_SEL BAdI for Material Special Field Selection
BADI_MATNR_CHECK_PVS Check Material for Use in iPPE
BADI_MATERIAL_REF Addition of customer-defined default data for material
BADI_MATERIAL_OD Integration of New Objects in Material or Article Maste
BADI_MATERIAL_CHECK Enhanced Checks for Material Master Tables
BADI_GTIN_VARIANT User Exit for Customer-Specific GTIN Variant Check
BADI_EAN_SYSTEMATIC BAdI for Internal Control of EAN Logic
Regards,
Surinder -
Add additional field in the output list
Tcode(VL10G) .ie.out put list will not showing one new field.I want to add one more field to output list. field(VIKP-SDABW) In the SHP_VL10_ITEM and write the logic in the exit LV50R_VIEWG05----
>USEREXIT_PREPARE_LAYOUT_FILL.Plase explain me step-by-step.It is very uggent?Please help me.
Thanks & Regards,
sairamHi Sairam,
Go through this info.
/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
Benefits Standard SAP functionality can be enhanced without modification to the standard code.
Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
Configuring SAP Enhancements
Basic Steps in Configuring an Enhancement
Find the appropriate Enhancement.
Enter the ABAP code in the "Z" program within the function module.
Create a project.
Add the Enhancement to the project.
Activate the project.
Example Business Scenario for Enhancements
Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
Detailed Steps
1. Tools ABAP Workbench Utilities Enhancements Definition Utilities List Enhancements
2. Do not execute this without any parameters! There are too many Enhancements and it will probably time out. Youre searching for a customer master exit. Enter mast in the short text (see Figure 1). Youll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
3. Execute the search.
Figure 1. Start Your Search for a Master Exit Here
4. Look through the list until you find the Enhancement for User exits: Customer Master Data.
5. Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
6. To continue, double-click on the function module EXIT_SAPMF02D_001
7. This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement (see Figure 2).
Figure 2. The Tables That Are Available for the Enhancement
8. To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
9. Return to the Source Code tab.
10. Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written (see Figure 3).
Figure 3. Your Program Will Begin After the Include Statement
11. Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
12. At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
13. Enter the following ABAP code into the program (Figure 4):
User exit to ensure that all US customers have a group key
entered on the customer master.
if i_kna1-land1 = 'US' and
i_kna1-brsch = ' '.
message e001(F2).
endif.
Figure 4. The ABAP Code You Need to Enter
14. Note that the table name matches the table name in the import tab tables.
15. In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
16. Save the program.
17. The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools ABAP Workbench Utilities Enhancements Project Management.
18. Enter the project name; begin the name with a "Z."
19. Click on the Create button.
Figure 5. Click on Create After You Type in the Project Name
20. Enter in a description for the project.
21. Click on the Enhancement Assignments button.
22. You will be prompted to save the enhancement. Click on Yes.
23. At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
24. Enter the name of the enhancement SAPMF02D (see Figure 6).
Figure 6. Enter the Name of the Enhancement Here
25. Save the project.
26. Back out of the enhancement assignment.
27. Activate the project by hitting the Activate button.
The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
Configuring Business Transaction Events
Basic Steps in Configuring an Event
Make sure the application is active for Business Transaction Events.
Copy the sample interface function module into a "Z" function module.
Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
Activate the function module.
Assign the function module to the event, country and application.
Example Business Scenario for Business Transaction Events
Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
1. IMG Menu Path: Financial Accounting Financial Accounting Global Settings Use Business Transaction Events Environment Infosystem (Processes).
2. Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
3. Execute the search with the defaults.
4. Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution (see Figure 7).
Figure 7. Find the Correct Interface for the Business Event
5. Put your cursor on the event and click on the Sample Function Module button.
6. You are now in transaction SE37 Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding (see Figure 8).
Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
7. Click on the Copy button.
8. Enter the "Z" function module name in the To Function Module field (see Figure 9).
9. Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to Function Groups Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
Figure 9. Enter Your "Z" Function Module Name Here
10. In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
11. The system will default into the source code screen where you may enter your ABAP code.
12. Notice the tables available for the code. Additional tables may be declared if necessary.
13. Enter the following source code (see Figure 10):
tables: lfa1.
data: z_groupkey like lfa1-konzs.
z_groupkey = ' '.
loop at t_bseg.
check for vendor lines. If one is found, read the vendor master and
retrieve the group key field.
if t_bseg-koart eq 'K'.
select single konzs from lfa1 into z_groupkey
where lifnr = t_bseg-lifnr.
endif.
Move the group key field into all line items allocation field.
loop at t_bsegsub.
t_bsegsub-zuonr = z_groupkey.
modify t_bsegsub index sy-tabix.
endloop. "t_bsegsub
endloop. "t_bseg
Figure 10. The Screen Where You Enter Your Source Code
14. Save the function module.
15. Back out to the main Function Builder screen by clicking on the green arrow button.
16. Activate the function module by clicking on the Activate button (see Figure 11).
Figure 11. Activate the Function Module from This Screen
17. Assign the function module to the event in the IMG: Financial Accounting Financial Accounting Global Settings Business Transaction Events Settings Process Function Modules of an SAP Appl.
18. Hit enter past the warning messages that this is SAP data.
19. Click on the New Entries button.
20. Enter the process for your interface. In your example it is 00001130.
21. Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
22. Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
23. Enter the new "Z" function module (see Figure 12).
Figure 12. Enter Your New "Z" Function Module Here
24. Save the settings. At this point you will be prompted for a CTS number for the configuration change.
25. The Business Transaction Event is complete! You are ready for testing.
Configuring User Exits (Older)
Basic Steps in Configuring an User Exit
Create a "Z" program for the User Exits and enter the necessary ABAP code.
Enter the new program name into table T80D.
Configure the application to call the User Exit.
List of User Exits
Variable Field Movements
Substitutions in FI, CO, PCA
Validations in FI, CO, PCA
Rollups in SPL
Fixed Field Movements in SPL
Cost Center Summarization on Detail Screen
Sets Formula Variables
Example Business Scenario for User Exits
Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
1. Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools ABAP Workbench Development ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
2. You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
3. At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change (see Figure 13).
Figure 13. To Enter Your New Code, Select Source Code and Click on the Change Button
4. Enter the following code in the User Exit (Figure 14):
FORM E01_MVC USING FROM_FIELD TO_FIELD.
to_field = 'CORP'. "Set a default business unit.
read table zzbusunit to determine the business unit field.
select single z_bunit from zzbusunit into to_field
where hkont = accit_glx-hkont and
geber = accit_glx-geber and
fkber = accit_glx-fkber.
ENDFORM.
Figure 14. Enter Your New Code at This Screen.
5. Activate the program by clicking on the Activate button.
6. Change the configuration in the User Exit table to point to your new "Z" program.
7. Follow the IMG menu path: Financial Accounting Special Purpose Ledger Basic Settings User Exits Maintain Client Specific User Exits.
8. The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program (see Figure 15).
Figure 15. Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
9. Save the changes.
10. The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting ? Special Purpose Ledger ? Basic Settings ? Master Data ? Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
Figure 16. After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
11. Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
12. The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
13. Save the field movement.
14. You are ready to test your User Exit!
Rewords some points.
Rgds,
P.Naganjana Reddy -
How to add Custom fields ( under the Custom Tab) in RMMAIN ( SOLMAN 4.0)
Hi Expert,
I am working in SOLMAN 4.0
i want to add some Custom fields in RMMAIN Transaction -Screen level..( under one custom tab)
i have tried in EEWB, it is not helpful for RMMAIN
is any Screen exit available for RMMAIN? or any other way?
I ll give Reward points
Thanks & Regaids
Ganesh, RHi,
go through this...
https://wiki.sdn.sap.com/wiki/display/Snippets/Displaycustomerfieldsinheaderoflogisticsinvoiceverification+transactions
Thanks,
Shailaja Ainala. -
How to add icon field in the alv grid output
Hi Experts,
i need to add one icom column in the alvgrid.That icon if the contract is inacitve then it should shows inactive symbol.if the contract is account assignment lock then it should show that lock symbol.Please send me the any code or approach.
Thanks,
Venkat.Hello Venkat
Set<b> ls_fcat-icon = 'X' </b> in the fieldcatalog for the column where you want to display icons. In addition, add the following statement to your report:
TYPE-POOLS: icon. " replaces INCLUDE <icon>.
Do not use the coded values (e.g. '@01@') but the "normal" icon names, e.g. <b>ICON_DETAIL</b>.. In order to see the icon names call transaction SE38/SA38 and run report <b>RSTXICON</b>.
Regards
Uwe
Maybe you are looking for
-
How do i connect to the TV with a thunderbolt?
When i connect my MBP to my TV with a minidisplay to HDMI adapter to the Thunderbolt connection, it does not work. When i go to the screen window, no button to search for the TV appers.
-
How do i transfer music from one ipod to another using itunes
how do i transfer music from one ipod to another using itunes
-
Metadata not showing in Bridge
Until last week I was happily using Bridge with my picture captions and credits showing in the metadata window. Now all of a sudden they've gone. The metadata panel only shows the content of the Title field. The metadata is still there when I open 'f
-
MIRO price variance at document level
Hi all, Normally the MIRO price variance PP will be applicable for this company code and item level of the purchase order. it is possible to control the PP Document no level instead of po item level?.. any possiblities in standard..
-
Creating a new page and new layout in a Parent/Child report.
Hi, Currently I have a Parent/Child Report in Oracle Reports 6i. The report shows Contracts as the parent and the detail of the contracts are the Ads. Sometimes there are many ads which extend the contract to another page. Just a normal Parent/Child