Monday, December 24, 2012

Function module to get work items in a particular User ID


SAP_WAPI_CREATE_WORKLIST

Pass USER = "user ID"

and get table WORKLIST as output.


Sunday, September 23, 2012

BAPI for assigning object to class CL20N class type 032 (Release Strategy)

CL20N is an enjoy T-code because of that BDC will not work properly.

BAPI to change or create value is BAPI_OBJCL_CREATE this BAPI will not update in table, to get data updated in table we have to use BAPI commit  BAPI_TRANSACTION_COMMIT along with BAPI_OBJCL_CREATE.

Sample code.

REPORT  YTEST_CL20N.
* data
data: lw_object type OBJNUM,
      lc_table type TABELLE,
      lw_class type KLASSE_D,
      lw_cltype type KLASSENART.
*table
data: li_valuesnum  type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_NUM WITH HEADER LINE,
      li_valueschar type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CHAR WITH HEADER LINE,
      li_valuescurr type STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CURR WITH HEADER LINE,
      li_return     type STANDARD TABLE OF BAPIRET2.
*
concatenate 'SZ' 'A9' into lw_object.
CONDENSE lw_object.
lc_table = 'T16FS'.
lw_class = 'PR_OVERALL_RELEASE'.
lw_cltype = '032'.

* character
li_valueschar-CHARACT = 'PR_DOCUMENT_TYPE'.
li_valueschar-VALUE_CHAR = 'ZI02'.
append li_valueschar.
clear: li_valueschar.

*Currency
li_valuescurr-CHARACT = 'PRVALUE1'.
li_valuescurr-VALUE_FROM = '0'.
li_valuescurr-VALUE_TO = '4999'.
li_valuescurr-CURRENCY_FROM = 'SAR'.
li_valuescurr-CURRENCY_TO = 'SAR'.
APPEND li_valuescurr.
CLEAR: li_valuescurr.

* NUMERIC
li_valuesnum-CHARACT = 'ZEMER_PRIO'.
li_valuesnum-VALUE_FROM = '1'.
append li_valuesnum.
clear: li_valuesnum.

CALL FUNCTION 'BAPI_OBJCL_CREATE'
        EXPORTING
          objectkeynew    = lw_object
          objecttablenew  = lc_table
          classnumnew     = lw_class
          classtypenew    = lw_cltype
        TABLES
          allocvaluesnum  = li_valuesnum
          allocvalueschar = li_valueschar
          allocvaluescurr = li_valuescurr
          return          = li_return.

BREAK-POINT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
          .

Please find CL20N screen




Sunday, March 18, 2012

IS Oil SD routines


1.Create a Routine in 05F5 within the customer name space.
2.Register that object with SAP to get the registration key.(you need to have OSS ID to get the object registered with SAP.Refer google to know how a object should be registered with SAP)
3.Even though the Routine is a customised one,it will reside within the SAP Development Class.
4.Once you get the Registration key,code the logic in the respective routine.
5.Activate it and test.
6.While transporting tag the RV80HGEN in the TR as XPRA so that the routine gets activated automatically once the TR is imported in the target client.
7.For more info you can refer the SAP Notes 327220 and 114978

Sunday, February 12, 2012

Copying SAP script from one client to another

Open Program RSTXSCRP.
1.Select Form Radio Button
2.In Mode Writre EXPORT
3. In Object Name Give Your Object Name(SAPSCRIPT/SMARTFORM NAME)
4. In Second Block give the file name 'C:\YSANDI.FRM'
Note That Form Name should be MAX 6 CHARCTER. and Extension Should be .FRM-->Execute
5. Then Go to other client-->Run The Program
6.GIVE MODE IMPORT
7.Then Excute and Select The File from PC.