on 05-20-2019 5:32 AM
Hi All,
I am working on a custom package, which allow user to enter a flag, then pass the flag to badi for calculation.
I have created a custom badi using UJ_CUSTOM_LOGIC and pass the flag using table REPLACEPARAM.
But it is fail to pass the flag to badi, below are the sample coding:
Coding in DM:
PROMPT(TEXT,%VAR1%,,,)
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZTEST,TAB,%TAB%)
TASK(ZTEST,EQU,%EQU%)
TASK(ZTEST,SUSER,%USER%)
TASK(ZTEST,SAPPSET,%APPSET%)
TASK(ZTEST,SAPP,%APP%)
TASK(ZTEST,SELECTION,%SELECTION%)
TASK(ZTEST,REPLACEPARAM,ZVAR1%EQU%%VAR1%%TAB%) TASK(ZTEST,LOGICFILENAME,ZLOGIC_SCRIPT.LGF)
Coding in logic script:
*START_BADI ZBADI
ZVAR1 = $VAR1$
*END_BADI
Coding in Badi:
data : wa_param type ujk_s_script_logic_hashentry.
data : it_test type STANDARD TABLE OF ZTABLE " temp table for checking
, wa_test like line of it_test
.
read table IT_PARAM with key HASHKEY = 'ZVAR1' into wa_param .
if sy-subrc = 0.
wa_test-ztest = wa_param-hashvalue.
append wa_test to it_test.
modify ZTABLE from table it_test.
endif.
And the ZTABLE gives the result as $VAR1$
Don't know why the name of the variable is passed to the temp table instead of variable value.
Thank you in advance for your help.
Regards,
Kelvin
Hi Vadim,
Thanks for your response.
We use ZTEST chain because of internal IT policy, a custom logic script need to call by a custom chain.
I have changed to use standard /CPMB/DEFAULT_FORMULAS and test if the parameter is passed to the script.
But I want to know if we can pass characters from DM to script instead passing number?
Our BW version are: SAP_BW 740 Patch:0021
EPM version : 10.0 SP33
CPMBPC 810 Patch:0015
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"internal IT policy, a custom logic script need to call by a custom chain." - sorry, but absolutely senseless! Always use standard chain - you custom chain can be incorrectly configured!
And what is the result with standard chain?
"But I want to know if we can pass characters from DM to script instead passing number?" - yes, we can! I do not see any issues!
Why you are using ZTEST chain?
Use standard /CPMB/DEFAULT_FORMULAS
First ensure that parameter is passed to very simple script without badi...
Post your BPS & BW version and SP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.