on 05-17-2006 8:10 PM
Hello,
I have the following start routine in update rules. The infosource is 2LIS_11_VAITM, the data target is 0SD_O01. This update rule start routine references both STORNO, and RECORDMODE. I am wondering if that makes any sense?
In my scenario, please consider the fact that in the Infosource 2LIS_11_VAITM, under the transfer rules, there is a red X in the 0RECORDMODE TP column. It looks as though ROCANCEL is assigned to 0STORNO.
Because of the above, I think that the 'ELSEIF' will never be satisfied, since I am guessing RECORDMODE, will never be populated.
Any thoughts or advice is appreciated.
Thanks,
Nick
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CS2LIS_11_VAITM.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
LOOP AT DATA_PACKAGE.
IF DATA_PACKAGE-doc_categ NE 'C' AND
DATA_PACKAGE-doc_categ NE 'I'.
DELETE DATA_PACKAGE.
elseif DATA_PACKAGE-recordmode eq 'R'.
DATA_PACKAGE-recordmode = ' '.
DATA_PACKAGE-storno = 'X'.
modify DATA_PACKAGE.
ENDIF.
ENDLOOP.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
*
ENDFORM.
Nick,
In the transfer rules tab page assign the 0recordmode. because you are not assigning values to the 0recordmode. it won't execute this block of code.
DATA_PACKAGE-recordmode = ' '.
DATA_PACKAGE-storno = 'X'.
modify DATA_PACKAGE.
assign the infoobject to the Orecordmode.
all the best.
Regards,
Nagesh Ganisetti.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Nagesh,
currently I have the field 'ROCANCEL' mapped to infoobject '0STORNO' in transfer rules.
Are you suggesting that i delete that field mapping, and rather have the field 'ROCANCEL' mapped to infoobject '0RECORDMODE', thus leaving 0STORNO unmapped?
I think I agree, just looking for a little furthur confirmation. And if this is how it looks in your system.
Oh yeah, and regarding the actual appearance of the code:
I found an OSS note that justified it: 530706
Thanks Again,
Nick
Message was edited by: Nick Bertz
Hello Nagesh,
Thanks for your reply. I am not sure how to assign a datasource field to two infosource Infoobjects in the transfer rules.
I am looking at the infosource under transfer rules (where datasource fields are assigned to InfoSource InfoObjects) and I don't see a way to assign a datasource field to multiple InfoObjects.
Can you offer a suggestion on how?
Thank you for your help!
Nick
Hello Nagesh,
Sorry I have not posted back for a long time.
I originally questioned how to assign the ROCANCEL field to both 0RECORDMODE and 0STORNO infoObjects.
I looked at the transfer rules and I saw that 0STORNO -> 0STORNO, So I looked at how the fields were originally assigned to infoobjects and I noticed that ROCANCEL was assigned to 0STORNO.
Having picked up on that detail, I simply assigned 0STORNO to 0RECORDMODE, just like 0STORNO -> 0STORNO.
I think that is what you wanted me to do.
Thanks for the Help!
Nick
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.