Thursday, May 30, 2013
The below function modules are used to get the manager
- RH_GET_LEADING_POSITION : Employee number or Employee User ID or Position or Org.Unit are passed as Object to function module.
Wednesday, May 29, 2013
Steps to read called program output into internal table defined in the calling program.
- Use syntax addition "EXPORTING LIST TO MEMORY AND RETURN" to SUBMIT statement. This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST. ABAPLIST is a structured data type in ABAP Dictionary.
- Use the function module LIST_FROM_MEMORY to load the list from the ABAP Memory to an internal table of the row type ABAPLIST.
- Use the function module LIST_TO_ASCI to convert the content of an internal table of the row type ABAPLIST to ASCII representation.
- Please check the below screen shots to see data in table before and after LIST_TO_ASCI function module is used.
- Data is in pipe delimited. So loop the internal table and split the row type into corresponding fields.
- Sample code to convert ASCI data to internal table
LOOP AT IT_WGTY_REP INTO WA_WGTY_REP. CHECK SY-TABIX GT 3 AND SY-TABIX LT LV_TOT_RECS. IF SY-TABIX = 4. SPLIT WA_WGTY_REP AT '|' INTO LV_DUMMY01 LV_DUMMY02. IF LV_DUMMY02 CS 'List Contains no data'. EXIT. ENDIF. ENDIF. " Split pipe delimited data SPLIT WA_WGTY_REP AT '|' INTO LV_DUMMY01 WA_ALV_OUTPUT_C-PERNR LV_DUMMY02 WA_ALV_OUTPUT_C-FPPER WA_ALV_OUTPUT_C-PAYDT WA_ALV_OUTPUT_C-LGART WA_ALV_OUTPUT_C-LGTXT WA_ALV_OUTPUT_C-BETRG LV_DUMMY03. APPEND WA_ALV_OUTPUT_C TO IT_ALV_OUTPUT_C. CLEAR WA_ALV_OUTPUT_C. ENDLOOP.
Tuesday, May 28, 2013
Steps to get Reporting manager
- Method 1: Use function module RH_STRUC_GET with evaluation path 'BOSSONLY'
- Method 2: Use function module RH_READ_INFTY_1001 with Subtype 'B012'(Is managed by).
Wednesday, May 15, 2013
Lets assume that we want to check all the pending leave work items.
Steps
- Get all pending work items from table SWWWIHEAD(Header Table for All Work Item Types).
"Get all pending work items SELECT WI_ID WI_TYPE WI_STAT TOP_WI_ID FROM SWWWIHEAD INTO TABLE IT_PLVE_WITEMS WHERE WI_TYPE = 'W' AND WI_STAT = 'READY' AND WI_RH_TASK = C_WORFLOW_TASK.
- Get the work items assigned to user using table SWWUSERWI.
IF IT_PLVE_WITEMS IS NOT INITIAL. "Current Work Items Assigned to a User SELECT USER_ID WI_ID TASK_OBJ FROM SWWUSERWI INTO TABLE IT_WI_AGENT FOR ALL ENTRIES IN IT_PLVE_WITEMS WHERE WI_ID = IT_PLVE_WITEMS-WI_ID AND TASK_OBJ = C_WORFLOW_TASK AND NO_SEL = SPACE. ENDIF.
- Based on two tables, we can filter work item for user.
Tuesday, May 14, 2013
Monday, May 13, 2013
We set workflow status to Logically deleted, if the (sub) workflow is no longer required or meaningful.
Steps to Execute Logically Delete Work Item
Repetitive structures in HR denotes the table which has the same type of field structures(which stores same kind of values). For example, Table for Basic Pay Infotype 0008 is PA0008. This table stores all the wage types assigned to an employee in its fields LGAXX, BETXX, ANZXX, EINXX and OPKXX. Here XX denotes the number 01-40. These fields are repeated for 40 times, as it is defined in SAP system(We can maintain 40 different wage types for an employee in Standards).
Sunday, May 12, 2013
RP-READ-INFOTYPE - Macro is used to retrieve all infotype records for one person in a given time period are put in one internal infotype table..
RP-PROVIDE-FROM-FRST - Macro is used to retrieve the first record from internal table and placed in the table header in the given time period.
RP-PROVIDE-FROM-LAST - Read latest record
Macro is used to retrieve the last(latest) record from internal table and placed in the table header in the given time period.
Followers
Popular Posts
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- SAP ABAP-PDF display in Custom Container
- Web Dynpro ABAP ALV - ON_CLICK event
















