on 01-10-2011 12:20 PM
Hi Folkds,
What is the difference between first and second global declaration in the start routine of a transformation?
First: $$ begin of global - insert your declaration only below this line -
Second: $$ begin of 2nd part global - insert your code only below this line *
I browse a lot of forum post but got no clear definition. Bellow definition from one post seemd to be the most approriated, but as there where several other onces I wanted to re-check if somebody can confirm bellow:
-
There are two places where you can make a global declaration in a Start or End Routine.
1. $$ begin of global - insert your declaration only below this line -
... "insert your code here
*" In this part your global declarations values will only be retained for the 1st packet. For e.g. if here you are reading any date range from a Ztable, then it will applt only for the first data packet
.*2. $$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
$$ end of 2nd part global - insert your code only before this line *
" You need to declare here in a scenario where data volume is large and you need to retain the values across the whole data set comprising of multiple packets. (As e.g I cited above)
-
Some difference I noted is that 1st part never acceptes an include. But 2nd part does.
Thanks for all replies in advance,
Axel
>
>
> 1. $$ begin of global - insert your declaration only below this line -
> ... "insert your code here
>
> *" In this part your global declarations values will only be retained for the 1st packet. For e.g. if here you are reading any date range from a Ztable, then it will applt only for the first data packet
> l
not true
1st part => declarations according to OO standards
2nd part => declarations according to "normal" ABAP standards
the official docu is rather "vague"
(http://help.sap.com/saphelp_nw70ehp2/helpdata/en/43/857adf7d452679e10000000a1553f7/content.htm)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mmmmm.... still confused.
Reading the docu means I understand
> 1. $$ begin of global - insert your declaration only below this line -
> ... "insert your code here
You define there CLASS data -> something you would use accross packages.
You define data -> somthing that is valid only for the particular package e.g. lookup table that is based on all entries in source package etc.
But how comes the 2nd global declaration into play?
not sure about the class or abap declarations...but from experience, i know you can declare the same kind of data in both. then only difference i noted till today is : if you put ag a internal table in the first part, then the data is kept across all datapackage. put it in the second and the data is only kept for the current package.
M.
apparently I once double checked this with SAP, this was their answer
In the first global part you can write your declaration or code you want to be able to reach globally in the tranformation.
The 2nd global part will be used for those transformations which are migrated from an update or transfer rule. Routines used there will be automaticaly generated into the 2nd global part.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anyone?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.