cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping E1EDK03 dates to flat file structure.

Former Member
0 Kudos

Hello All,

Scenario is like this....

Source:

E1EDK03

IDDAT 011

Datum 20090331

E1EDK03

IDDAT 017

Datum 20100401

<PAYHEADM>

<payHead>

<docType>testing mapping</docType>

<docRef>54948989</docRef>

<docDate>20090331</idocDate>

<paymDate>99999999</paymDate>

</payHead>

</PAYHEADM>

Based on the Qualifier 011 and 017, target fields document creation date and payment date are to be mapped. I tried using removecontext on both the source fields dint work also tried changing the context to IDOC instead of E1EDK03. Nothing works, my maps looks something like below:

/ns0:MT_PAYHEAD/PAYHEADM/payHead/idocDate=iF(removeContexts(/PEXR2002/IDOC/E1EDK03/DATUM), equalsA(removeContexts(/PEXR2002/IDOC/E1EDK03/IDDAT), const(value=011)), const(value=99999999))

/ns0:MT_PAYHEAD/PAYHEADM/payHead/paymDate=iF(removeContexts(/PEXR2002/IDOC/E1EDK03/DATUM), equalsA(removeContexts(/PEXR2002/IDOC/E1EDK03/IDDAT), const(value=017)), const(value=99999999))

What I can see in the test is it keeps reading the first occurence of E1EDK03 and just maps that. Am on PI7 can anyone suggest where I am going wrong.

--Prashanth

Accepted Solutions (0)

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Prashanth,

Can you give us the condition on what you want to achieve? It will be more helpful to suggest a solution.

raj.

Former Member
0 Kudos

Raj,

The condition for populating payment date will be check E1EDK03-IDDAT = '017' and populating Paymentdate in target with E1EDK03-DATUM.

Condition for document creation date check E1EDK03-IDDAT = '011' and populating Docdate in target with E1EDK03-DATUM.

The E1EDK03 segment will appear twice with 2 different qualifiers in the source under IDOC.

--Prashanth

justin_santhanam
Active Contributor
0 Kudos

Can you try with the below code?

Create UDF - All values in Queue, three input parameters IDDAT,CONST,DATUM


for(int i=0;i<IDDAT.length;i++)
{
if(IDDAT<i>.equals(CONST[0]))
result.addValue(DATUM<i>);
}

Map like

IDDAT (Change Context to IDOC level)

DATUM (Change Context to IDOC level) ---> PaymentDate

CONST ("017")

IDDAT (Change Context to IDOC level)

DATUM (Change Context to IDOC level) ---> DocumentDate

CONST ("011")

Thanks!

Former Member
0 Kudos

Hi Raj,

I am looking for a solution in GUI mapping, suppose this is a simple scenario... helpful if you can suggest something in the same lines.

--Prashanth

justin_santhanam
Active Contributor
0 Kudos

Alright sir , try the below logic

http://www.flickr.com/photos/8764045@N06/4516394853/sizes/o/

raj.

Former Member
0 Kudos

Hi Raj,

I implemented what you sent, but still getting the same error. Want to send some screen shots of display queues, is there an email where I can mail u the screen shots..

---Prashanth

justin_santhanam
Active Contributor
0 Kudos

Sure, send me the snapshot. Get the email id from Business Card.

raj

Former Member
0 Kudos

Hi Raj,

Thanks for your help.. The map sent by you did work.

I also realised that. using IF(with then and else) was not giving the desired output, but using Ifwithoutelse did work as it is supposed to in this scenario..

Any Inputs on what might be going wrong with using either of them, as I thought both would do the same thing.

Did not have to use MapwithDefault as well..

--Prashanth