Skip to Content
0

Automate Data manager Package - Load from BW to BPC - Time Variable - How to pass variable values

Oct 24, 2017 at 07:43 PM

152

avatar image
Former Member

Hi All,

I am loading the transnational data from BW to BPC by manually selecting the time period. Is there anyway I can automate the time variable. Now I manually select the time period when I execute the DM .Is there anyway to derive the time period based on the system date ? I want to automate this by deriving the time period values based on the system date.

I can see it can be done through the UJD_TEST_PACKAGE and prompt file.Like update the UJFS file once a month when ever the job is executed.

Is there any ABAP BADI's exist to do this or any other solution to pass the variable in the DM package based on the system date ?

For example : I enter 2017/012 for time period in DM package. I want this 2017/012 has to be derived based on the system date automatically when ever the job executed monthly.

Thanks in advance for the help and much appreciated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Vadim Kalinin Oct 24, 2017 at 07:56 PM
0

I have answered this question number of times - WHY NOT TO SEARCH?

Very short answer:

Create a copy of UJD_TEST_PACKAGE like ZUJD_TEST_PACKAGE

In the abap code read the system date and fill table LTH_ANSWER_PROMPT with correct values including Time period from system date.

Create chain with ZUJD_TEST_PACKAGE

Run it!

Another option is to use VBA to pass answer prompt from Excel: https://blogs.sap.com/2017/06/16/simple-vba-function-to-pass-parameters-to-dm-packages/

Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Excellent. Thanks Vadim.

0
Former Member
Former Member

Vadim,

LTH_ANSWER_PROMPT contains the whole prompt file as a string. Is there any function module to read the XML file and replace the Fiscal Period by the derived system values.

LTH_ANSWER_PROMPT - contains

Infoprovider....

Selections......

TRANSFORMATION = \ROOT\WEBFOLDERS\NV\GM\DATAMANAGER\TRANSFORMATIONFILE

TARGETMODE = Yes

RUNLOGIC = No

CHECKLCK = No

All the above appears as a string in the LTH_ANSWER_PROMPT and I am trying to replace the FISPER based on the derivation in the selections. Is there any method or function module to read the string(Prompt XML file) and replace the filed FISPER with the low and high value.

Thanks in advance for the help.

0

You don't need to parse xml file, just replace a text string in the Selections line!

0

Or you can create this line as a fixed text string... What's the issue?

Can you post the selection string you have?

0
Former Member
Vadim Kalinin

Thanks Vadim for the quick reply and much appreciated.

The LTH_ANSWER_PROMPT contains the whole string like

InforProvide = Z* SELECTION = http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema"> Type="Selection"> 0FISCPER 3 001.2014 002.2014 0FISCVARNT 1 Z4 0FISCYEAR 1 2014 0BUS_AREA 0CHNGID **************TRANSFORMATION = \ROOT\WEBFOLDERS\NV\GM\DATAMANAGER\TRANSFORMATIONFILES\z*.xls TARGETMODE = Yes RUNLOGIC = No CHECKLCK = No

I just want to replace the

<ID>0FISCPER</ID><Operator>3</Operator><LowValue>001.2014</LowValue><HighValue>002.2014</HighValue>

with the derived fiscal period value.

Is there any function module to find and replace it ? Thanks again.

0

Why do you need to replace anything???

Your answer prompt is fixed (to my mind)

You have strings:

SEL1 = "http: ... <ID>0FISCPER</ID><Operator>3</Operator><LowValue>".

SEL2 = "</LowValue><HighValue /> ...".

and TIME = "004.2017".

RESULT = SEL1 && TIME && SEL2.

0
Former Member
Vadim Kalinin

Thanks always for the quick reply . I will try and keep you posted.Thanks again.

0