cancel
Showing results for 
Search instead for 
Did you mean: 

B1IF FileWatcher ? (Flat file to SAP B1 BP)

Former Member
0 Kudos

Hi All,

I have a flat file which my scenario package is picking up and after the pickup I want to read the data to a B1Object through a XSL Transformation:

This is how my processing looks...

after the unbranch my xsl transformation looks like this



<BOM xmlns="">



<BO>




<AdmInfo>





<Object>2</Object>





<Version>2</Version>




</AdmInfo>




<BusinessPartners>





<row>






<CardCode>







<xsl:copy-of select="$msg/io/row[0]/col[1]/text()"/>






</CardCode>






<CardName>






TESTBPNAME






</CardName>





</row>




</BusinessPartners>



</BO>


</BOM>

But it does not seem to pull the cardcode through except when I hard code it like the card name.

Please help ...

Kind Regards, Brenden

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

This is how my final atom xsl transformation looks before the B1Object.

But it is not working.

<BOM xmlns="">

                              <BO>

                                        <AdmInfo>

                                                  <Object>2</Object>

                                                  <Version>2</Version>

                                        </AdmInfo>

                                        <BusinessPartners>

                                                  <row>

                                                            <CardCode>

                                                                      <xsl:copy-of select="$msg/io/row[0]/col[0]/text()"></xsl:copy-of>

                                                            </CardCode>

                                                            <CardName>

                                                               TESTBPNAME

                                                            </CardName>

                                                  </row>

                                        </BusinessPartners>

                              </BO>

                    </BOM>

Please help...

Regards, Brenden

Former Member
0 Kudos

Still no luck ...

keep getting blank Card Code

pedro_magueija
Active Contributor
0 Kudos

Hi Brenden,

Have you tried with value-of?

<xsl:value-of select="$msg/io/row[0]/col[0]/text()" />

Good luck.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Hi Pedro,

Yes I have tried that as well it still returns a blank.

Thanks for the reply.

Regards, Brenden

pedro_magueija
Active Contributor
0 Kudos

Hi Brenden,

Can you post the original XML to which you are applying the XSLT transformation?


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Hi Pedro,

This is the screen shots that will give you the main idea.

Processing:

GetFile XML:

xForm XML:

B1Object:

I and I use this code in the xForm atom to pull through the data from the GetFile:



<BOM xmlns="">



<BO>




<AdmInfo>





<Object>2</Object>





<Version>2</Version>




</AdmInfo>




<BusinessPartners>





<row>






<CardCode>







<xsl:value-of select="$msg/io/row[0]/col[0]/text()"/>






</CardCode>





</row>




</BusinessPartners>



</BO>


</BOM>

It pulls through a blank for a the CardCode.

If there is anything more you need please let me know.

Thanks,

Regards, Brenden

Former Member
0 Kudos

Hi All,

I finally found a solution....

The code to use in your XSL Transformation is supposed to look like this


<xsl:for-each select="/vpf:Msg/vpf:Body/vpf:Payload[./@id='atom6']/bfa:io/bfa:row">

<xsl:value-of select="./bfa:col[1]"/>


</xsl:for-each>

atom6 is my GetFile atom.

Regards, Brenden

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Good work Brendan, I was just reading your post and wanted to propose you the same solution.

Regards,

Trinidad.

Former Member
0 Kudos

Hi Maria,

Thank you,

It took me a while but it was urgent so I had to find a solution

Thanks for the reply

Regards, Brenden

pedro_magueija
Active Contributor
0 Kudos

Hi Trinidad,

I can't see Brenden's post.

This reply has been hidden. This can happen if the message has been hidden by a moderator, or has been reported as abusive.

Is there anyway we can have it "unhidden"?


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pedro,

The answer is marked as "Currently Being Moderated" and I cannot publish it. But I have been able to copy his post here.

The problem was that the information was not in $msg directly but inside Payload id="atom6".

Hi All,

I finally found a solution....

The code to use in your XSL Transformation is supposed to look like this


<xsl:for-each select="/vpf:Msg/vpf:Body/vpf:Payload[./@id='atom6']/bfa:io/bfa:row">

<xsl:value-of select="./bfa:col[1]"/>


</xsl:for-each>

atom6 is my GetFile atom.

Regards, Brenden

pedro_magueija
Active Contributor
0 Kudos

Hi Trinidad,

Great . Thanks for the help.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Answers (0)