Showing posts with label function module. Show all posts
Showing posts with label function module. Show all posts
2007-03-22
FM for changing object directory entry
It is called TR_TADIR_INTERFACE. We used it for changing the source system of cross-transported objects (Parameter WI_TADIR_SRCSYSTEM), but you can use it to change just about everything (see parameters).
2007-03-21
Displaying a tree in a list
data: gt_mytree type snodetext occurs 0,
gw_mytree type snodetext.
gw_mytree-name = 'Verwendungsnachweis'(001).
gw_mytree-tlevel = 1.
APPEND gw_mytree TO gt_mytree.
* ...
* Create the whole tree here by filling gt_mytree
* ...
CALL FUNCTION 'RS_TREE_CONSTRUCT'
TABLES
nodetab = gt_mytree
EXCEPTIONS
tree_failure = 1
id_not_found = 2
wrong_relationship = 3
OTHERS = 4.
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'.
2005-11-15
Yummy FM for reading IS-U Master Data
You can get every possible data using just one function module called ISU_STRUCTURE_READ. The trick is, you have to place the table connections into tables parameter XT_PATH and fill the corresponding "kick-off" table parameter. Let's have an example. We want to have contract account, contract (billable service), and installation data to a specified BP.
data: xt_path type EFKKPATH occurs 0 with header line,
iekun TYPE line of ISU01_EKUN_TAB occurs 0 with header line,
ifkkvkp like FKKVKP1 occurs 0 with header line,
iever like ever occurs 0 with header line,
ieanl like v_eanl occurs 0 with header line.
refresh xt_path.
xt_path-tabfrom = 'EKUN'. xt_path-tabto = 'FKKVKP'.
append xt_path.
xt_path-tabfrom = 'FKKVKP'. xt_path-tabto = 'EVER'.
append xt_path.
xt_path-tabfrom = 'EVER'. xt_path-tabto = 'EANL'.
append xt_path.
iekun-partner = your business partner.
append iekun.
CALL FUNCTION 'ISU_STRUCTURE_READ'
EXPORTING
X_AB = sy-datum
X_BIS = sy-datum
TABLES
XT_PATH = xt_path
T_EANL = ieanl
T_EKUN = iekun
T_EVER = iever
T_FKKVKP = ifkkvkp
EXCEPTIONS
PATH_INVALID = 1
DATE_INVALID = 2
SELECTION_FAILED = 3
OTHERS = 4.
Table connections also work the other way (e.g. from installation to BP). Check the possible connections in the source code of the FM. Form
INIT_ALL, lines starting with MAC_LINK_APP.
2005-09-22
BAPIs for changing IS-U master data
Recently I found some BAPIs for changing IS-U master data. Here you are:
- BAPI_ISUPARTNER_CHANGE - Business Partner
- BAPI_ISUACCOUNT_CHANGE - Contract Account
- BAPI_ISUCONTRCT_CHANGEFROMDATA - Contract: well this one is a little tricky. Even some common fields are not included in the standard interface, you have to use EXTENSIONIN. Make sure you name the fields of your new append to BAPI_TE_EVER as in table EVER or else they won't be transferred.
- BAPI_FUNCLOC_CHANGE - Device location
- BAPI_EQUI_CHANGE - Equipment
I tried them all, they seem to work, but remember: I have only changed one single field with them - no complex operations.
Always put an 'X' into the corresponding field of the import parameter DATA_...X you want to change.
Subscribe to:
Posts (Atom)