Program to update employee data
Hi all,
Is there any std program which can be used to update the data for employee as it is done manually in transaction "Manage Employee data"??
We need to do a mass update of email address for employees under USER ACCOUNT and POSITION programatically .
You have 8 days to write a primitive payroll system, and you are new to programming? Well, I wish you the best of luck. But it looks like you have good specs there. Start by designing the data file.
Similar Messages
-
Hi Guys,
I am using SAP identity management 7.1 and ERP ECC 6.0 EHP4. I amanage to pull data from HCM into identity store and create an account in active directory.
I am now trying to update employee data in the SAP ERP HCM system with the email address using Business Add-In (BAdI) Implementation BADI_IDM_HR_COMMUNICATION of BAdI definition BADI_EXTEND_IDENTITY.
I do not know how to call the BADI from SAP identity management.
Can you please help as i need this to finish the user provisioning ?
Many thanksHi Scott,
Thank you very much for your help.
I am working on trying those steps. I will let you know the result.
in this document you sent me above they mentionned "see IC-supervisors-guide.pdf that is delivered within the installation.
I did a full search on the install and could not find it.
Have you seen this file before ?
Many Thanks -
Program to update Delivery dates of STO based on Material availability
Hi,
We have requireement in which, we need to material availability check for the materials on daily basis. This is only for Stock Trasnfer orders.
Suppose there is STO ( Stock Transfer Order) 1 that has been created for material M1 for qty 20. The scheduled delivery date for the material is tomorrow. Now I create another STO 2 today for the same material and same quantity. The scheduled delivery date that was proposed was 7 days from today.
Some one deletes the STO 1. Now Material M1 with qty 20 is avaiable to use. I then go in the system, open STO 2 in change mode. Select the line item and click on Material availability check. When I do this, the new delivery dates are proposed.
This is standard sap functionality.
We have required to do this programmatically. Is there any standard SAP program which will check all the STO's by there creation date and do the material avaibility check automatically and re-set STO dates.
Regards,
ShahuInstead of all that, you could just use stock transport scheduling agreements. MRP can update those automatically during its processing.
-
ABAP Program to update DSO data
Hi,
I want to write a program which will modify existing data in the DSO. But don't know how to approach. I know I can't directly update data table of DSO. Please help.HI,
Have a look at the following function modules.This might help you address your case:
RSDRI_ODSO_MODIFY:Modifies Entries in a Transactional ODS Cube
RSDRI_ODSO_MODIFY_RFC:Modifies entries in a transactional ODS cube (RFC version)
RSDRI_ODSO_UPDATE :Modifies Data Records in a Transactional ODS Object
RSDRI_ODSO_UPDATE_RFC:Modifies Data Records in a Transactional ODS Object (RFC Version)
Regards,
Abhishek -
To update Employee Data with Function module
Hi
CRM employee master and HR employee master need to be mapped
for the labor cost posting function to work.
In BP transaction (Change in BP role : Employee),
I could update "Personnel number" and "User Name"
under Identification Tab
now I need to do same job with Function module in report program.
Anybody knows that what Function module should I use ?
I tryed to do it with Function "CRMXIF_PARTNER_SAVE"
but I only succesed to update imformations under Adress tab in BP transaction.
thank you.Use FM BAPI_BUPA_CREATE_FROM_DATA.
Rg,
Harshit -
Is there a process/program to update tables/data after System Refresh?
We are planning a refresh of SAP R/3 47 and SRM EBP 4.0. Copies of all data from our production system will be refreshed onto our test environment.
Is there a program that can be run to reset the "Destination" targets as there is with "source" using BDLS?
We can copy out certain tables and reimport, but we fear that we may be missing something. If anyone has informatoin on the process for performing a refresh, we would appreciate hearing about it.
Thanks,
BIll
Message was edited by: William Olliver
Using BDLS and clearing out some of the custom tables (allowing normal programs to rebuild data points) did the trick.Hi Bill,
BDLS takes care of the table entries that correspond to the Logical System. This takes care of almost 80-90% of the entries.
Keep in mind however, you will need to change all the entries that correspond to an backend RFC destination or other webservers once a copy is made; as those are not updated by BDLS.
Some of these are (as it is entirely dependent on the scenarios being implemented):
DEFINE BACKEND SYSTEMS:
--IMG>SRM>...
ORGANIZATION STRUCTURE
--Use standard program RHOMATTRIBUTES_REPLACE
--Plus, Change other attributes: POrg,PGrp,Plants...
EDI/IDOC/ALE entries for partner profiles
--WE21 etc.
TWPURLSVR, TWPURLPATH, etc
--Table entries
WORKFLOW Verification Steps
--IMG>Workflow...
MIDDLEWARE PARAMETERS in R/3 and SRM.
--Table Entries
CATALOG ENTRIES
--IMG>Master Data...
Hope this helps.
-Sachin Sethi -
How to update Previous Employee Data in ABAP HR
I'm new to ABAP HR Module and have problem to update Previous Employee Data in ABAP HR.
Helpful Advice will be appreciated.wat u want update or upload
plz don't post incomplete questions
u should clear with ur requirement -
Update the data into the ZTABLE fields thru program logic ..?
hi all,
i have ZTABLE1,ZTABLE2,ZTABLE3, and this tables like ALV grids using object methods.
in the same table fields now i wanted to update the data into the ZTABLE fields thru program logic .
could anyone please help me ....
please provide if anyone of have any program logic that would be helpfull to me.
thanks in advance...
srinivas....Hi Srinivas,
The following statements are used to upload the data into custom tables.
1. Modify
2. Update
3. Insert
if you are using OO ALV, you should enable the 'SAVE' button in the main toolbar. if the user press the save button, then you should upload the data to the custom table.
please find the example code, in this example 'PERFORM F_SAVE_DATA'(here i gave the message only, you write your own logic here) is used to save the data in custom table.
Report Program: ZB_ALVOOPS_TEST
Line:-----
REPORT ZB_ALVOOPS_TEST MESSAGE-ID ZCR_MESSAGES.
Top Include - Global Data Declaration *
INCLUDE ZB_ALVOOPS_TEST_TOP.
SEL Include - Selection Screen *
INCLUDE ZB_ALVOOPS_TEST_SEL.
AT SELECTION SCREEN *
Initialization Event *
INITIALIZATION.
Initialize Screen Number.
PERFORM F_INITIALIZE.
Initialize Field Catalog for ALV Grid.
PERFORM F_INITIALIZE_GRID.
END-OF-SELECTION.
Call Display Screen *
CALL SCREEN 9000.
Event Handler - Class Definition and Implementation *
INCLUDE ZB_ALVOOPS_TEST_CL01.
PBO Event - Module Implementation *
INCLUDE ZB_ALVOOPS_TEST_PBO.
PAI Event - Module Implementation *
INCLUDE ZB_ALVOOPS_TEST_PAI.
Subroutine Include *
INCLUDE ZB_ALVOOPS_TEST_F01.
Include: ZB_ALVOOPS_TEST_TOP
Line:-------
Type Declaration For Internal Tables *
Collection Data
TYPES: BEGIN OF TY_MARA ,
MATNR TYPE MATNR , " Material
VPSTA TYPE VPSTA , " Maintenance status of complete material
MTART TYPE MTART , " Material Type
MBRSH TYPE MBRSH , " Industry Sector
MATKL TYPE MATKL , " Material Group
BISMT TYPE BISMT , " Old material number
MEINS TYPE MEINS , " Base Unit of Measure
BSTME TYPE BSTME , " Order unit
BRGEW TYPE BRGEW , " Gross weight
MAKTX TYPE MAKTX , " Material Description
ROWCOLOR TYPE CHAR4 , " Row Color
END OF TY_MARA .
Flag *
DATA: FG_REFRESH TYPE XFLD , " Used to Refresh ALV
FG_SAVE TYPE XFLD . " Data Saved Or Not.
Internal Table Declaration *
DATA: IT_MARA TYPE STANDARD TABLE OF TY_MARA , " Internal table for Material
WA_MARA TYPE TY_MARA . " Workarea for Material
Variable Declaration For General Constants *
CONSTANTS: C_SCREEN_SELECT TYPE SYDYNNR VALUE '9001' , " Selection Screen Number
C_SCREEN_SELECT_NIL TYPE SYDYNNR VALUE '9002' , " Empty Screen Number
C_STATUS9000 TYPE CHAR10 VALUE 'STATUS9000' , " PF-Status
C_TITLEBAR TYPE CHAR4 VALUE '9000' , " Title Bar
C_ISSUE_CONTAINER TYPE SCRFNAME VALUE 'WORKCONTAINER', " Container Name (Screen Painter)
C_BUTTON_TYPE TYPE CHAR1 VALUE '3' , " Button Type
C_EXECUTE TYPE CHAR4 VALUE 'SELE' , " Functions 'SELE' -> Execute
C_BACK TYPE CHAR4 VALUE 'BACK' , " Functions 'BACK' -> Back to main screen
C_ENTER TYPE CHAR5 VALUE 'ENTER' , " Functions 'ENTER' -> No Action
C_SEL01 TYPE CHAR5 VALUE 'SEL01' , " Functions 'SEL01' -> Toggle Function
C_SAVE TYPE CHAR4 VALUE 'SAVE' , " Functions 'SAVE' -> Save Function
C_REFRESH TYPE CHAR7 VALUE 'REFRESH' , " Functions 'REFRESH' -> Clear and Fres All objects
C_ADD_MI TYPE CHAR6 VALUE 'ADD_MI' , " Functions 'ADD_MI' -> Add New Media Issue
C_TRUE TYPE CHAR1 VALUE 'X' , " Set X value
C_REQUIRED TYPE CHAR1 VALUE '1' , " Un-Confirmed Qty field obligatory or not.
C_INPUT TYPE CHAR1 VALUE '0' , " Reason field should not be input.
C_ALV_SAVE TYPE CHAR1 VALUE 'A' , " ALV
C_ERROR TYPE CHAR1 VALUE 'E' , " Error Type
C_SIGN TYPE CHAR1 VALUE 'I' , " Sign
C_OPTION TYPE CHAR2 VALUE 'EQ' , " Option.
C_COMMIT_WAIT TYPE CHAR1 VALUE '5' , " Waiting to update in DB
C_TABNAME TYPE CHAR1 VALUE '1' , " Parameter (ALV)
C_CANCEL TYPE CHAR1 VALUE 'N' , " Cancel
C_YES TYPE CHAR1 VALUE 'J' . " Yes.
Variable Declaration For Container and ALV Grid *
DATA: OBJ_CUST_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER , " Container Class
OBJ_CUST_GRID TYPE REF TO CL_GUI_ALV_GRID . " ALV Grid Class
Field Catalog Declaration For Container and ALV Grid *
DATA: IT_FIELDCAT TYPE LVC_T_FCAT , " Field Catalog
IT_EXCLUDE TYPE UI_FUNCTIONS , " Standard Function Exclude from ALV
WA_FIELDCAT TYPE LVC_S_FCAT , " For Field Catalog
WA_LAYOUT TYPE LVC_S_LAYO . " ALV Layout
Global Variable Declaration *
DATA: OK_CODE TYPE SY-UCOMM , " OK CODE ( Screen Attribute Don't Change the var.name)
G_SAVE_CODE TYPE SY-UCOMM , " OK CODE
G_ANSWER TYPE CHAR1 , " OK or Cancel.
G_SELECTION_DYNNR TYPE SYDYNNR , " Screen Number
G_ERROR_TEXT TYPE CHAR128 , " Error Text
G_SELECTION_TOGGLE_TEXT TYPE CHAR50 , " Toggle Text, Value: Hide Selection, Show Selection
G_MATNR TYPE MATNR , " Material
G_SMATNR TYPE MATNR , " Material
G_SMTART TYPE MTART . " Material Type
Include: ZB_ALVOOPS_TEST_SEL
Line:-------
Selection Screen
SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN .
SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE TEXT-001 .
SELECT-OPTIONS: S_MATNR FOR G_SMATNR , " Material
S_MTART FOR G_SMTART . " Material Type
SELECTION-SCREEN END OF BLOCK SELECTION .
SELECTION-SCREEN END OF SCREEN 9001 .
Empty Selection
SELECTION-SCREEN BEGIN OF SCREEN 9002 AS SUBSCREEN .
SELECTION-SCREEN BEGIN OF BLOCK SELECTION_NIL WITH FRAME TITLE TEXT-002 .
Nil
SELECTION-SCREEN END OF BLOCK SELECTION_NIL .
SELECTION-SCREEN END OF SCREEN 9002 .
Include: ZB_ALVOOPS_TEST_CL01
Line:-------
CLASS lcl_event_handler DEFINITION *
Event Handler Class Definition *
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS:
HANDLER_TOOLBAR FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
IMPORTING E_OBJECT E_INTERACTIVE ,
HANDLER_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
IMPORTING E_UCOMM .
ENDCLASS. "lcl_event_handler DEFINITION
CLASS lcl_event_handler IMPLEMENTATION *
Event Class Implementation. *
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
Toolbar -----Create 'Add Issue' button
METHOD HANDLER_TOOLBAR.
DATA: L_WA_TOOLBAR TYPE STB_BUTTON. " Toolbar
CLEAR: L_WA_TOOLBAR.
Button Type
L_WA_TOOLBAR-BUTN_TYPE = C_BUTTON_TYPE . " 3.
APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
Add Issue Button.
CLEAR: L_WA_TOOLBAR.
L_WA_TOOLBAR-FUNCTION = 'ADD_MI' . " 'ADD_MI' .
L_WA_TOOLBAR-ICON = 'ICON_CREATE'.
L_WA_TOOLBAR-QUICKINFO = 'CREATE' . " 'Add Issue'.
L_WA_TOOLBAR-TEXT = 'CREATE' . " 'Add Issue'.
L_WA_TOOLBAR-DISABLED = ''.
APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
CLEAR: L_WA_TOOLBAR.
ENDMETHOD. "handler_toolbar
User Actions Events-- Handle 'Add Issue' Button Click.
METHOD HANDLER_USER_COMMAND.
CASE E_UCOMM.
Add Issue Button.
WHEN C_ADD_MI.
IF NOT G_MATNR IS INITIAL.
FG_REFRESH = C_TRUE.
PERFORM F_ADD_MEDIAISSUE.
ENDIF.
ENDCASE.
Refresh Control
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
Handle Exceptions
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
G_ERROR_TEXT = TEXT-026. " 'Control System Error'.
WHEN 2.
G_ERROR_TEXT = TEXT-027. " 'Control CL_GUI_CFW Has Raised Error'.
ENDCASE.
MESSAGE G_ERROR_TEXT TYPE 'E'.
ENDIF.
Refresh Alv Grid.
PERFORM F_REFRESH_GRID.
ENDMETHOD. "handler_user_command
ENDCLASS. "lcl_event_handler IMPLEMENTATION
Object Ref. Event Class.
DATA: OBJ_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
Include: ZB_ALVOOPS_TEST_PBO
Line:----
Module STATUS_9000 OUTPUT *
Set PF-Status *
MODULE STATUS_9000 OUTPUT.
PF Status
SET PF-STATUS C_STATUS9000 .
SET TITLEBAR C_TITLEBAR .
ENDMODULE. " STATUS_9000 OUTPUT
Module Create_Alvgrid OUTPUT *
Create Or Refresh ALV Grid *
MODULE CREATE_ALVGRID OUTPUT.
PERFORM F_PROCESS_ALV .
PERFORM F_REFRESH_GRID.
ENDMODULE. " create_alvgrid OUTPUT
Include: ZB_ALVOOPS_TEST_PAI
Line:----
Module exit_command INPUT *
Exit Command ( Cancel and Exit ) *
MODULE EXIT_COMMAND INPUT.
LEAVE PROGRAM.
ENDMODULE. " exit_command INPUT
Module user_command_9000 INPUT *
User Command - Process toolbar Events *
MODULE USER_COMMAND_9000 INPUT.
Take an Action based on user Input
G_SAVE_CODE = OK_CODE.
CLEAR OK_CODE.
CASE G_SAVE_CODE.
Back
WHEN C_BACK .
Raise the Confirmation Message When User not saved the data.
IF FG_SAVE = C_YES.
PERFORM F_EXITCHECK CHANGING G_ANSWER .
IF G_ANSWER = C_YES.
PERFORM F_SAVE_DATA.
ELSE.
CLEAR G_SAVE_CODE.
ENDIF.
CLEAR: FG_SAVE.
ENDIF.
LEAVE PROGRAM.
Enter
WHEN C_ENTER.
Execute ( F8 )
WHEN C_EXECUTE .
IF IT_MARA IS INITIAL.
PERFORM F_SELECTMATERIAL.
ENDIF.
Toggle Button
WHEN C_SEL01.
PERFORM F_TOGGLE_SELECTION_SCREEN. " USING ok_code.
SAVE ( CTRL+S )
WHEN C_SAVE.
IF NOT G_MATNR IS INITIAL.
PERFORM F_SAVE_DATA.
CLEAR: G_MATNR.
ENDIF.
New Entry ( CTRL+F1 )
WHEN C_REFRESH.
PERFORM F_REFRESH_DATA.
ENDCASE.
ENDMODULE. " user_command_9000 INPUT
Include: ZB_ALVOOPS_TEST_F01
Line:----
Form f_toggle_selection_screen *
Toggle Function - Hide Selection / Show Selection *
FORM F_TOGGLE_SELECTION_SCREEN.
Toggle Function
IF G_SELECTION_DYNNR = C_SCREEN_SELECT.
G_SELECTION_DYNNR = C_SCREEN_SELECT_NIL.
G_SELECTION_TOGGLE_TEXT = TEXT-902.
ELSE.
G_SELECTION_DYNNR = C_SCREEN_SELECT.
G_SELECTION_TOGGLE_TEXT = TEXT-901.
ENDIF.
ENDFORM. " f_toggle_selection_screen
Form f_initialize
Initialize Screen Number and Text
FORM F_INITIALIZE .
Initialize Screen Number
G_SELECTION_DYNNR = C_SCREEN_SELECT.
G_SELECTION_TOGGLE_TEXT = TEXT-901.
ENDFORM. "f_initialize
Form f_selectmaterial *
FORM F_SELECTMATERIAL .
Select the data from Mara Table
SELECT A~MATNR
A~VPSTA
A~MTART
A~MBRSH
A~MATKL
A~BISMT
A~MEINS
A~BSTME
A~BRGEW
B~MAKTX
INTO TABLE IT_MARA
FROM MARA AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
WHERE A~MATNR IN S_MATNR
AND A~MTART IN S_MTART
AND B~SPRAS = 'EN'.
IF SY-SUBRC = 0.
FG_REFRESH = C_TRUE.
FG_SAVE = C_YES .
G_MATNR = C_TRUE.
LOOP AT IT_MARA INTO WA_MARA WHERE BRGEW >= 200.
WA_MARA-ROWCOLOR = 'C310'.
MODIFY IT_MARA FROM WA_MARA.
ENDLOOP.
ELSE.
MESSAGE 'No data Found' TYPE 'E'.
ENDIF.
ENDFORM. " f_selectmaterial
Form f_initialize_grid *
Initialize Field Catalog. *
FORM F_INITIALIZE_GRID .
field catalog
PERFORM F_ATTRFCAT USING :
'MATNR' '1' '0' TEXT-005 '15' '0' 'X' ' ' ' ',
'VPSTA' '1' '1' TEXT-006 '15' '0' 'X' ' ' ' ',
'MTART' '1' '2' TEXT-007 '15' '0' ' ' ' ' ' ',
'MBRSH' '1' '3' TEXT-008 '15' '0' ' ' ' ' ' ',
'MATKL' '1' '4' TEXT-009 '15' '0' ' ' 'X' ' ',
'BISMT' '1' '5' TEXT-010 '15' '0' ' ' ' ' ' ',
'MEINS' '1' '6' TEXT-011 '15' '0' ' ' ' ' ' ',
'BSTME' '1' '7' TEXT-012 '15' '0' ' ' ' ' ' ',
'MAKTX' '1' '8' TEXT-013 '15' '0' ' ' ' ' 'C711',
'BRGEW' '1' '9' TEXT-014 '15' '0' ' ' ' ' ' '.
Set Editable Fields in ALV.
PERFORM F_SETEDIT_FIELDS CHANGING IT_FIELDCAT.
ENDFORM. "f_initialize_grid
Form f_setedit_fields *
Set Editable Fields in ALV *
C_IT_FIELDCAT <-- Field Catalog *
FORM F_SETEDIT_FIELDS CHANGING C_IT_FIELDCAT TYPE LVC_T_FCAT.
Local Variable Declaration.
DATA: LS_FIELDCAT LIKE LINE OF C_IT_FIELDCAT. " Field Catalog
Create Editable Fields.
LOOP AT C_IT_FIELDCAT INTO LS_FIELDCAT.
CASE LS_FIELDCAT-FIELDNAME.
WHEN 'BRGEW'.
LS_FIELDCAT-EDIT = C_TRUE.
WHEN 'MAKTX'.
LS_FIELDCAT-EDIT = C_TRUE.
ENDCASE.
MODIFY C_IT_FIELDCAT FROM LS_FIELDCAT.
ENDLOOP.
ENDFORM. " f_setedit_fields
Form f_attrfcat *
Update Field Catalog Internal Table *
U_FIELDNAME --> Field Name *
U_ROW_POS --> Row Position *
U_COL_POS --> Column Position *
U_SELTEXT_L --> Display Column Heading *
U_OUTPUTLEN --> Heading Output Length *
U_DECIMALS_OUT --> Number of decimal places in output *
U_KEY --> Key in ALV Display *
U_FIX --> Existence of fixed values *
FORM F_ATTRFCAT USING
U_FIELDNAME TYPE SLIS_FIELDNAME
U_ROW_POS TYPE SYCUROW
U_COL_POS TYPE SYCUCOL
U_SELTEXT_L TYPE SCRTEXT_L
U_OUTPUTLEN TYPE OUTPUTLEN
U_DECIMALS_OUT TYPE CHAR1
U_KEY TYPE CHAR1
U_FIX TYPE VALEXI
U_COL_COLOR TYPE LVC_EMPHSZ.
Update field catalog.
WA_FIELDCAT-FIELDNAME = U_FIELDNAME.
WA_FIELDCAT-ROW_POS = U_ROW_POS.
WA_FIELDCAT-COL_POS = U_COL_POS.
WA_FIELDCAT-COLTEXT = U_SELTEXT_L.
WA_FIELDCAT-SELTEXT = U_SELTEXT_L.
WA_FIELDCAT-OUTPUTLEN = U_OUTPUTLEN.
WA_FIELDCAT-DECIMALS_O = U_DECIMALS_OUT.
WA_FIELDCAT-KEY = U_KEY.
WA_FIELDCAT-VALEXI = U_FIX.
WA_FIELDCAT-EMPHASIZE = U_COL_COLOR.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "ATTR_FCAT
Form f_refresh_data *
Clear All the objects used in the program ( Data Related ) *
FORM F_REFRESH_DATA .
Clear All the Objects Used in Our Program.
CLEAR: S_MATNR ,
S_MTART ,
IT_MARA ,
OK_CODE ,
FG_REFRESH ,
FG_SAVE ,
G_SAVE_CODE ,
G_MATNR .
FREE: S_MATNR ,
S_MTART ,
IT_MARA ,
OK_CODE ,
FG_REFRESH ,
FG_SAVE ,
G_SAVE_CODE ,
G_MATNR .
Refresh Alv.
FG_REFRESH = C_TRUE.
ENDFORM. " f_refresh_data
Form f_process_alv *
1. Create Custom Container *
2. Create ALV Grid *
3. Exclude Standard Functions *
4. Display the ALV *
5. Register the Events. *
FORM F_PROCESS_ALV .
Display ALV
Custom Container
IF OBJ_CUST_CONTAINER IS INITIAL.
CREATE OBJECT OBJ_CUST_CONTAINER
EXPORTING
CONTAINER_NAME = C_ISSUE_CONTAINER.
ALV Grid
IF OBJ_CUST_GRID IS INITIAL.
CREATE OBJECT OBJ_CUST_GRID
EXPORTING
I_PARENT = OBJ_CUST_CONTAINER.
ENDIF.
Exclude Standard Functions
PERFORM F_EXCLUDETOOLBAR USING OBJ_CUST_GRID
CHANGING IT_EXCLUDE.
Layout.
WA_LAYOUT-CWIDTH_OPT = C_TRUE.
WA_LAYOUT-INFO_FNAME = 'ROWCOLOR'.
ALV Grid Display
CALL METHOD OBJ_CUST_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = WA_LAYOUT
IT_TOOLBAR_EXCLUDING = IT_EXCLUDE
I_SAVE = C_ALV_SAVE
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT[]
IT_OUTTAB = IT_MARA.
ENDIF.
Register Editable ALV Events
CALL METHOD OBJ_CUST_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
EXCEPTIONS
ERROR = 1
OTHERS = 2.
*Create Object for Custom Event Handler Class if the ref. object is
*initial.
IF OBJ_EVENT_HANDLER IS INITIAL.
CREATE OBJECT OBJ_EVENT_HANDLER.
ENDIF.
Register Events
SET HANDLER: OBJ_EVENT_HANDLER->HANDLER_TOOLBAR FOR
OBJ_CUST_GRID,
OBJ_EVENT_HANDLER->HANDLER_USER_COMMAND FOR
OBJ_CUST_GRID.
Set Toolbar
CALL METHOD OBJ_CUST_GRID->SET_TOOLBAR_INTERACTIVE.
ENDFORM. " f_process_alv
Form f_excludetoolbar *
Exclude Standard Functions from ALV *
U_OBJ_CUST_GRID --> Instant for CL_GUI_ALV_GRID *
C_IT_EXCLUDE <-- Internal table for Exclude *
FORM F_EXCLUDETOOLBAR USING U_OBJ_CUST_GRID TYPE REF TO CL_GUI_ALV_GRID
CHANGING C_IT_EXCLUDE TYPE UI_FUNCTIONS.
Exclude Standard Functions
CLEAR: C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_CHECK TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_REFRESH TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY_ROW TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_CUT TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_DELETE_ROW TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_APPEND_ROW TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_INSERT_ROW TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_MOVE_ROW TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE_NEW_ROW TO C_IT_EXCLUDE.
APPEND U_OBJ_CUST_GRID->MC_FC_LOC_UNDO TO C_IT_EXCLUDE.
ENDFORM. " f_excludetoolbar
Form f_create_returnrequest *
Create Return Request based on the Work container ( ALV Grid Data) *
FORM F_CREATE_RETURNREQUEST.
Message to save
ENDFORM. " f_create_returnrequest
Form f_add_mediaissue *
Create New Media Issue if the user click 'ADD ISSUE' Button. *
1. Get the Input From User *
2. Get Total Delivery and Return Quantity *
3. Append to Final internal table *
FORM F_ADD_MEDIAISSUE .
Local Variable Declaration.
MESSAGE 'Add Button Clicked' TYPE 'I'.
ENDFORM. " f_add_mediaissue
Form f_refresh_grid *
Refresh ALV Grid *
FORM F_REFRESH_GRID .
Refresh ALV Grid.
IF FG_REFRESH IS NOT INITIAL.
CALL METHOD OBJ_CUST_GRID->REFRESH_TABLE_DISPLAY.
CLEAR: FG_REFRESH.
ENDIF.
ENDFORM. " f_refresh_grid
Form f_getcollectissue *
FORM F_GETCOLLECTISSUE .
Collection Plan Data
ENDFORM. " f_getcollectissue
Form f_perpare_final *
FORM F_PERPARE_FINAL .
Perpare Final Internal table
ENDFORM. " f_perpare_final
Form f_validate_data *
FORM F_VALIDATE_DATA.
Message if any data validation.
ENDFORM. " f_validate_data
Form f_modify_final *
Update Actual Delivery Qty and Return Qty in Final Internal table *
Form f_save_data *
Save the Data When User Click 'Save' Button *
FORM F_SAVE_DATA .
Message
MESSAGE 'Save Button Clicked' TYPE 'I'.
ENDFORM. "f_save_data
Form f_exitcheck *
When User Exit from the Transaction then Raise Confirmation message*
C_ANSWER <-- OK or Cancel. *
FORM F_EXITCHECK CHANGING C_ANSWER TYPE CHAR1.
Security Check.
C_ANSWER = C_CANCEL.
CALL FUNCTION 'POPUP_TO_CONFIRM_DATA_LOSS'
EXPORTING
TITEL = TEXT-039
IMPORTING
ANSWER = C_ANSWER.
ENDFORM. "f_exitcheck
Screen Numer : 9000
Line:------
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
CALL SUBSCREEN: SELECTIONSCREEN INCLUDING SY-CPROG G_SELECTION_DYNNR.
MODULE CREATE_ALVGRID.
PROCESS AFTER INPUT.
MODULE EXIT_COMMAND AT EXIT-COMMAND.
CALL SUBSCREEN: SELECTIONSCREEN.
MODULE USER_COMMAND_9000.
pls reward if it is useful -
Function Module for book Training Program for an employee
Hi All,
As we are having the Standard function module "HR_INFOTYPE_OPERATION" for PA infotypes.
So is there any function module by using that function module in program we can Book,Cancel, Rebook , Prebook a training program for an employee as we can Book,Cancel, Rebook , Prebook through transaction code PSV1 in Training Module .
And i want to know the table names where the data insert / update when we book a training program for an employee through transaction code PSV1 in Training & event Module.
can anyone help...?
Regards,
Priya.Hi,
use FM 'RH_PARTICIPATION_INSERT' for Book attendance . -
Can I choose which programs or apps upload data to iCloud?
My iCloud account tells me that my 5GB are full (that's right from the start when I updated the software to iOS5 :-S) Well, I noticed that there are actually just a few apps that I would want to make data backups for in iCloud. Can I choose which programs use that function? The only option I found so far is to turn the data backup function off or on, for ALL the apps. But I only want to use it for a FEW ones! Is this supported in iOS5??
PS. How come it gets full so quickly? The programs that uses most data (Hipstamatic for example) use only barely 0,5GB. So what I can see the 5GB shouldn't be full yet. What have I missed?I think starting from the second home screen, the new app will be placed in the first available space. If this is the case, you would be able to control the placement manually by making sure your landing screen has empty icon slots and all previous screens, with the exception of the first one, have all of the icon slots occupied. I did run across an app that seemed like it would allow the user to create placeholder icons on the home screens but I can not think of the keywords to pull it up now. There are several icon creators/enhancers that may do the same thing. You can use one of these apps or use the Safari button to Add to Home Screen, to fill up the screens. You could even use a folder to store and deploy your screen filler icons. It seems like it would be more trouble than it's worth but I do have my home screens assigned for different roles. Hopefully Apple will continue to refine the user interface.
-
Employee Data for Business Partner
Hi All,
I am using BAPI_BUPA_CREATE_FROM_DATA as a Function Module in a program to create Business Partners by reading data from an Excel file.I am able to create business partners but I couldn't find the BAPI using which I can add Employee data for "Employee" role of a new Business Partner.
Can anyone help me out in this regard.
Kind Regards,
DeeptiHi Deepti,
You can see if the function module BAPI_BUPA_FS_EMPLOYM_ADD is more appropriate for you.
Regards
Venu -
How to update Education Data in ABAP HR.
I'm new to ABAP HR Module and have problem to update Education Data in ABAP HR.
Helpful Advice will be appreciated.Hi Suniel ,
Education data in HR is held in infotype 22.
Go to PA30, enter the employee number & maintain 22 infotype (with respective subtype i.e. high school, university, etc..)
Regards,
Dilek -
Updating Header data in VA42 transaction.
Hi all,
I have BDC program that updates technical objects at item level, BOM header level.
But my client insists me to update on overall header level where all the item data must be populated. It is like when u enter into VA42 and without selecting any item, if we select technical objects all item level technical objects must be displayed.
Please advise on this regard.
Regards,
Thanks in advance.
B.AnandhHi all,
I have BDC program that updates technical objects at item level, BOM header level.
But my client insists me to update on overall header level where all the item data must be populated. It is like when u enter into VA42 and without selecting any item, if we select technical objects all item level technical objects must be displayed.
Please advise on this regard.
Regards,
Thanks in advance.
B.Anandh -
How do I update a date field through CMP
I wonder how to update a date field through CMP.
For example, I can't update an employee table with following statement.
employee.setHire_date('2002-03-20');
Thanks,Thats correct......
Try using the following code....
String strDate ="2002-03-20";
String date_fmt = "yyyy-MM-dd";
java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(date_fmt);
java.util.Date hireDate =null;
hireDate =(Date) sdf.parse(strDate);
employee.setHire_date(hireDate);
Hope this helps
Cheers
--Venky -
Hi to all,
Can any one provide me sample program to update BOM via Function Module CSAP_MAT_BOM_CREATE.
As i already have created the program , but run time error is coming KEY_INCOMPLETE for CSAP_MAT_BOM_CREATE.
as i have already search the SDN , but cant get any specific answer for that.
Note: itab_bom_header and itab_bom_item_details are of same line type as
i_stko and t_stpo with data.
DATA: wa_bom_header TYPE zia_str_bom_header,
wa_itab_bom_item_details TYPE zia_str_bom_item_details.
IF itab_bom_header[] IS NOT INITIAL .
READ TABLE itab_bom_header INTO wa_bom_header INDEX 1 .
ENDIF.
*---- BOM header data structure
DATA: BEGIN OF tstko OCCURS 0.
INCLUDE STRUCTURE stko_api01.
DATA: END OF tstko.
DATA: wa_tstko LIKE LINE OF tstko.
*---- BOM items table
DATA: BEGIN OF tstpo OCCURS 0.
INCLUDE STRUCTURE stpo_api01.
DATA: END OF tstpo.
DATA: wa_tstpo LIKE LINE OF tstpo.
**---- Object dependencies table
Basis data
*data: begin of tdep_data occurs 0.
*include structure csdep_dat.
*data: end of tdep_data.
Description
*data: begin of tdep_descr occurs 0.
*include structure csdep_desc.
*data: end of tdep_descr.
Source
*data: begin of tdep_source occurs 0.
*include structure csdep_sorc.
*data: end of tdep_source.
Sequence
*data: begin of tdep_order occurs 0.
*include structure csdep_ord.
*data: end of tdep_order.
Documentation
*data: begin of tdep_doc occurs 0.
*include structure csdep_doc.
*data: end of tdep_doc.
CALL FUNCTION 'CALO_INIT_API'
EXPORTING
FLAG_DB_LOG_ON = 'X'
FLAG_MSG_ON = 'X'
FLAG_API_API_CALL_ON = ' '
FLAG_COLLECT_MSG_ON = ' '
EXTERNAL_LOG_NO = 'API'
DEL_LOG_AFTER_DAYS = '10'
DATA_RESET_SIGN = '!'
EXCEPTIONS
LOG_OBJECT_NOT_FOUND = 1
LOG_SUB_OBJECT_NOT_FOUND = 2
OTHERS = 3
LOOP AT itab_bom_header INTO wa_bom_header.
wa_tstko-BASE_QUAN = wa_bom_header-base_qty.
wa_tstko-BASE_UNIT = wa_bom_header-BASE_UOM.
wa_tstko-BOM_STATUS = wa_bom_header-BOM_STATUS.
ENDLOOP.
LOOP AT itab_bom_item_details INTO wa_itab_bom_item_details.
wa_tstpo-item_categ = wa_itab_bom_item_details-item_category.
wa_tstpo-item_no = wa_itab_bom_item_details-bom_itm_number.
wa_tstpo-component = wa_itab_bom_item_details-component.
wa_tstpo-comp_unit = wa_itab_bom_item_details-uom.
wa_tstpo-comp_qty = '10'.
wa_tstpo-valid_from = wa_itab_bom_item_details-valid_from.
wa_tstpo-itm_ident = wa_itab_bom_item_details-item_id .
APPEND wa_tstpo TO tstpo .
ENDLOOP.
FM to create BOM
CALL FUNCTION 'CSAP_MAT_BOM_CREATE'
EXPORTING
material = wa_bom_header-material
plant = wa_bom_header-plant
bom_usage = wa_bom_header-bom_usage
VALID_FROM = wa_bom_header-VALID_FROM
CHANGE_NO =
REVISION_LEVEL =
i_stko = tstko " bom header
FL_NO_CHANGE_DOC = ' '
FL_COMMIT_AND_WAIT = ' '
FL_CAD = ' '
fl_default_values = 'X'
IMPORTING
fl_warning = fl_warning
bom_no = bom_no
TABLES
t_stpo = tstpo " bom item
T_DEP_DATA = tdep_data
T_DEP_DESCR = tdep_descr
T_DEP_ORDER = tdep_source
T_DEP_SOURCE = tdep_order
T_DEP_DOC = tdep_doc
T_LTX_LINE =
T_STPU =
EXCEPTIONS
error = 1
OTHERS = 2
IF sy-subrc <> 1.
WRITE 'error'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF fl_warning EQ 'X'.
WRITE 'done'.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
please can any one provide me the solution for that.
i shall be thankfull to you for this.
Regards
Pavneet Rana
Edited by: pavneet rana on Aug 18, 2011 3:01 PMThanks for reply,
i have debug my program and found that run time error is coming at GET_MAST function module.
but i have already checked that MATNR and STLNR is already filled before reaching to that FM.
GET_MAST
IF NOT SET IS INITIAL.
IF WA-MATNR IS INITIAL
AND WA-STLNR IS INITIAL.
RAISE KEY_INCOMPLETE.
ENDIF.
IF WA-MATNR <> SPACE
AND WA-STLNR <> SPACE.
RAISE KEY_INVALID.
ENDIF.
please can any one provide me the solution for that.
Regards
Pavneet Rana
Maybe you are looking for
-
Can I build in second HDD on Satellite P200-1I4?
Hi! First of all sorry for my bad English. =(( I have a toshiba SATELLITE P200-1I4 and question is: can I install one more (additional) HDD. Or there is only one SATA slot in this laptop? Unfortunately laptop is not near me now, and I can't remove ba
-
How to disallow use of my camera?
With the new update my camera is constantly on and I want to know how to shut that off
-
How t orecuperate one variable and put it in an other variable in a query
Hello ! i am creating a query, i need to recuperate the agency selected by the user (Caractéristique 1) and in the same query, to insert it in an other Caracterisque wich is inside an ratio. ( for to filtre the ratio with this agency on an other Cara
-
Can I stop my IPhone from pulling up old emails that I haven't deleted?
Can I stop my IPhone from pulling up old emails that I haven't deleted?
-
Auto Filter in LOV in form builber 6i
Suppose a table have 5 Records 101 102 103 104 105 when I call the Lov then it is displaying 5 records, but when I will select suppose 103 record no. and put in detail block, then after that I again call the LOv then it will display only four record