cancel
Showing results for 
Search instead for 
Did you mean: 

FCC issue

Former Member
0 Kudos

Sender FCC has to convert below structure.

Employee

-No

-Name

-Desig

-Salary

Incoming CSV file

No,Salary,Name,Desig

12,25000,Tom,Engineer

56,100000,Gill,CEO

77,25000,Rob,FrontDesk

As you can observe Salary supposed to come at the end of the record is appearing in the second position. I was told this is common and the order might change but all will be sent with a comma.

Is this possible? if yes with what param?

If I send with correct sequence, the FCC is working fine but when the sequence is changed, wrong values are sent to wrong fields.

I have filled:

Document name:Employee

Document namespace:http://host.com/ns1

Recordset structure: Employee,*

employee.fieldSeperator:,

Employee.fieldNames:no,Name,Desig,Salary

Thanks,

Venkat.

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Venkat,

                 The FCC parameters you have set is correct. The sender should maintain the same order while sending and not change the order. This order cannot be changed dynamically at FCC level.

You can include the logic of changing the order in mapping level. In mapping check if the value in any field is numeric and contains more than 3 digits . If the condition is true, then swap the contents of the fourth field with the field which has salary value in it.

Regards

Anupam

Former Member
0 Kudos

Thanks Anupam. I had provided simple file to make it understand better. In reality, we have approx 40 fields coming in. most of them have empty ,,, values.

any OS level command or module to handle this issue?

THanks,

Venkat.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Venkat,

                Did you try using NameA.missingLastFields parameter ?

NameA.missingLastFields

If the inbound structure has less fields than specified in the configuration then the XML outbound structure is created as follows:

  • ignore Outbound structure only contains the fields in the inbound structure
  • add    Outbound structure contains all fields from the configuration; the fields missing in the inbound structure are empty.
  • error Conversion is terminated due to the incomplete inbound structure. An error message is displayed.

If some fields in middle are coming as blank they will be comma separated hence target structure will be formed with blank values. Then again in mapping level you can handle those blank fields. 

Adapter module can also be used but what do you intend to do with blank fields?

Regards

Anupam

Former Member
0 Kudos

Dear Experts,

All I am looking for is based on the header values, I want to change the sequence of the field values.

Is it something that is possible with a standard way?

@Anupam,

If I can make the details values from CSV file to change sequence per header, I dont need to generate warning or error. Please suggest if there is a way to change the values in CSV based on the header value sequence.

Thanks,

Venkat.

former_member186851
Active Contributor
0 Kudos

Hello Venkat,

Since your sequence is the problem.

keep the


Recordset Sequence-- variable


and define key field values for each records.


http://help.sap.com/saphelp_srm40/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm


anupam_ghosh2
Active Contributor
0 Kudos

Hi Venkat,

             

                 There is no way you can dynamically alter field value position in FCC. The reason is that your sender side source XSD is fixed which will not change, thus FCC needs to follow the source XSD format.  There are two ways to resolve this issue

1. Ask the Business that as part of standard SAP solution they should send the payload in fixed format in same sequence.

This will reduce complexity of the project.If project complexity increases the time of delivery will also increase. In future cost of maintenance also increases.   With alteration of file format you will get more errors during run time causing business delays.


2. If Business do not say yes to your proposal then try following steps


a. Create the FCC as you already did


Document name:Employee

Document namespace:http://host.com/ns1

Recordset structure: Employee,*

Employee.fieldSeperator:,

Employee.fieldNames:no,Name,Desig,Salary

Employee.endSeperator: nl

b. Read the header line as part of payload.

c. In mapping level write and UDF which will check value of the header field and swap contents in the target side accordingly.

The source and target will have same XSD.

d. Do not generate the header filed values in target XSD.

Regards

Anupam

Answers (0)