cancel
Showing results for 
Search instead for 
Did you mean: 

File content converstion substructures

former_member452321
Participant
0 Kudos

Hi
I have the following file structure from sorce(Sender) .
I need to do convert into xml

Batch                                                         1..1
  BatchHeader                                           1..1
           DocumentType_H1                       1..1
           RDate                                             1..1
           RTime                                             1..1
  Dataset                                                  1..Unbound
        Supplier                                            1..1
                  DocumentType_H2              1..1
                  SuppID                                  1..1
  GoodsReceipt                                   0..Unbound
              PORecord   1..1
                          DocumentType_D1  1..1
                          PO_No                        1..1

1) How do I create the Record structure in file content conversion
BatchHeader,1,Supplier,* or should I include Dataset.Supplier also

2)
In additional configuration of FCc for field names or fixedlengths  ,
Supplier.fieldNames or Dataset.Supplier,fieldNames

My input file

H1test_test20131211220238

H210000104102

D14200803213

H210000108295

D1LL00R12016
H210000108296
D1KL00R12016
 

Thanks for your help

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mahesh

The best way would be to change your target structure in the below format

Batch                                                         1..1

  BatchHeader                                           1..1

           DocumentType_H1                       1..1

           RDate                                             1..1

           RTime                                             1..1

  Dataset                                                  1..Unbound

      

                  DocumentType_H2              1..1

                  SuppID                                  1..1

  GoodsReceipt                                   0..Unbound

             

                          DocumentType_D1  1..1

                          PO_No                        1..1


Remove the line supplier and PO.


But if you have strict restriction that you need to use the above structure, then create an intermediate structure as below


Batch                                                         1..1

  BatchHeader                                           1..1

           DocumentType_H1                       1..1

           RDate                                             1..1

           RTime                                             1..1

  Dataset                                                  1..Unbound

      

                  DocumentType_H2              1..1

                  SuppID                                  1..1

  GoodsReceipt                                   0..Unbound

             

                          DocumentType_D1  1..1

                          PO_No                        1..1


Then create an extra message mapping which will map this intermediate structure to the actual structure.




former_member452321
Participant
0 Kudos

Thank you all for helping me.

I have created structure as per the attached screen. After header h1,h2,D1,D2 are repeating .Plese let me know attached structure is going to work for the input

My input file

H1test_test20131211220238

H210000104102

D14200803213

D2435354554

H210000108295

D1LL00R12016

D27757557776
H210000108296
D1KL00R12016


former_member452321
Participant
0 Kudos

Hi Indrajit,

This is my source structure and not the target.

former_member184720
Active Contributor
0 Kudos

Hi Mahesh - I don't think it'll work. Are you doing multi mapping?

Instead of changing the message type occurence in the mapping, change the occurence of Batch to 0..unbounded.

Letz wait for other experts comments too

Former Member
0 Kudos

Hello,

I think it will work.

Message/Message1 will be added once text is converted into XML.So that's OK

Thanks

Amit Srivastava

former_member452321
Participant
0 Kudos

yes. you are right . I need to do multimapping. for each line item from recipt detail in the source ,it has to generate one target structure .

former_member452321
Participant
0 Kudos

Any suggestions?

Former Member
0 Kudos

Hello,

I am not sure what extra suggestions u are looking for? Did u tried converting ur text into XML using FCC? As already stated above that FCC conversion will work. At runtime PI will convert text into xml and then add multimapping nodes to it.

>>or each line item from recipt detail in the source ,it has to generate one target structure .

Certainly ur structure is not ideal but still u can achieve ur requirement. I would suggest u to change the occ of "Batch" node to o..unbounded and then use FCC.

Just to give u an idea ur Recordset Structure entries will be: BatchHeader,1,Supplier,*,PO_Record,*,ReceiptDetail,* 

And while doing mapping use multimapping concept to create desired output.

Thanks

Amit Srivastava

former_member452321
Participant
0 Kudos

Multimapping is working in test tab. I have an issue with content conversion. Getting the error for end to end testing in  content content conversion BatchHeader.keyFieldValue not found. The value exist in the file .

Attached the screen shots


Thanks for your help

former_member184720
Active Contributor
0 Kudos

Hi Mahesh - As i mentioned earlier, it doesn't work with your structure.

You have got 4 levels now.

Message type

     Batch

          BatchHeader

               Supplier

Instead of keeping supplier under dataset, create it directly inline to BatchHeader.

Also don't change the message type occurrence(keep it 1..1) for multi mapping, just change the batch occurrence to 0..unbounded.

If you really want to have a dataset, then first read the file like above suggested and have another graphical mapping to create dataset.

Former Member
0 Kudos

Hello,

First of all the structure which u have shown cannot be created using FCC. So u have to change the same and try to use the structure which u have shown in ur second last post.

>>I have an issue with content conversion. Getting the error for end to end testing in  content content conversion BatchHeader.keyFieldValue not found

Now coming to FCC error, ur parameters looks OK to me but having said so, make sure that there are no blank spaces  after "BatchHeader.keyFieldValue"?

Thanks

Amit Srivastava

former_member452321
Participant
0 Kudos

Thank you FCC is working

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

Hi Mahesh - It's not clear but if batchheader(BH), dataset(DS), goodsreceipt(GR) are on the same level then please check the below blog.

The same configuration mentioned here

SAPTechnical.COM - File Content Conversion

SAPTechnical.COM - File Content Conversion

Recordset structure : BH,1,DS,*,GR,*

If they are not on the same level - please attach a screenshot of your datatype

former_member452321
Participant
0 Kudos

BatchHeader and Dataset are in same level but under dataset there is anothr substructure

Attached screen shot

former_member184720
Active Contributor
0 Kudos

When Supplier and PO record are of 1..1 then i don't think you need to create them.

You can create the field directly under Dataset and GoodsReceipt right?

former_member452321
Participant
0 Kudos

Yes . I can create .them .But is there way to do fcc without changing the structure 

former_member184720
Active Contributor
0 Kudos

I don't think you can achieve with standard content conversion - 4 levels

Changing the structure is best possible option i feel

Harish
Active Contributor
0 Kudos

Hi Mahesh,

you can only achieve this with below option

  1. Modify structure and change to this structure in mapping
  2. Pick up the file as it is and use Java map
  3. Custom adapter module.

The best option is to use intermediat option and convert this to your input structure in mapping.

regards,

Harish