cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP to IDOC Scenario

mf_haq
Active Participant
0 Kudos

Hi Experts,

This is SFTP to IDOC scenario, Where I have to SUPPRESS/STOP creating IDOC on below condition.

Example: If the below condition satisfied I don't want to create IDOC, Else I have to create IDOC

field1 = A

filed2 = B

filed3 = C

Regards,

MFH

Accepted Solutions (0)

Answers (4)

Answers (4)

ambrish_mishra
Active Contributor
0 Kudos

Hi MF,

This will create errors in PI if none of the records from the file create an IDoc.

Why not suppress the records which are not required at the source.

I suggest checking with the third part on this possibility.

Ambrish

Former Member
0 Kudos

Hi MF

Use the node function Create-If to generate Idoc based on conditon. On the target side map idoc with Create-If and use the condtion you wanto to use.

For example see the below map. The target will generate if name is John

mf_haq
Active Participant
0 Kudos

Hi Indrajit,

I already tried with creatIf but it's giving below error at IDOC level...it will work at SEGMENT level...

Cannot create target element /ZDRSA_INVENTORY_RECEIPT. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD See error logs for details

Regards,

MFH

javier_alcubilla
Contributor
0 Kudos

Hi MFH

Use the receiver determination conditions using xpath:

If field1#A and field2#B and field3#C then Create the idoc

The left operand must be the fieldx

Operation NOT EQUAL (#)

right operand A, B or C

Regards

Javi

mf_haq
Active Participant
0 Kudos

HI Mark and Javi,

I have tried with above suggested logic.

Let us say i have a file with required and non required values (In this case PI has to create IDOC based on the condition and remains has to suppress/stop based on records avilable in the TEST FILE) BUT it's giving below

error in SXMB_MONI with

<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code> 

<SAP:P1 /> 

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:Stack>No receiver could be determined</SAP:Stack>

---- Please find attached RD condtion and suggest if any chanes required.

/http:MT_GOODSRECIPT_SEND/Recordset/row/UPDTransactionType ≠ TO AND

/http:MT_GOODSRECIPT_SEND/Recordset/row/UPDReasonCode ≠ T7  AND

/http:MT_GOODSRECIPT_SEND/Recordset/row/Zone ≠ K  OR

/http:MT_GOODSRECIPT_SEND/Recordset/row/UPDTransactionType ≠ I  AND

/http:MT_GOODSRECIPT_SEND/Recordset/row/UPDReasonCode ≠ TTO  AND

/http:MT_GOODSRECIPT_SEND/Recordset/row/Zone ≠ S  OR

/http:MT_GOODSRECIPT_SEND/Recordset/row/UPDTransactionType ≠ I  AND

/http:MT_GOODSRECIPT_SEND/Recordset/row/UPDReasonCode ≠ TTO  AND

/http:MT_GOODSRECIPT_SEND/Recordset/row/Zone ≠ T

Regards,

MFH

markangelo_dihiansan
Active Contributor
0 Kudos

Hello MF,

Can you try this condition:

/http:MT_GOODSRECIPT_SEND/Recordset/row[(UPDTransactionType != "TO" and UPDReasonCode != "T7" and Zone != "K") or (UPDTransactionType != "I" and UPDReasonCode != "TTO" and Zone != "S") or (UPDTransactionType != "I" and UPDReasonCode != "TTO" and Zone != "T")] EX

This requires you to use EX instead of equals (=) or not equals (!=). Also, please check multiline.

Hope this helps,

Mark

former_member192892
Active Contributor
0 Kudos

Hi MF,

Do this only at the receiver determination level. And select the option of ignore if no receiver is found. That is the only way to stop it.

Regards

Varun

markangelo_dihiansan
Active Contributor
0 Kudos

Hello MF,

You can use xPath in receiver determination for your requirement:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/06/07/customise-your-xpath-expressions-...

Regards,

Mark