Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Question from printec on Oct 10 at 3:08 AM Hi In CSV file there are Spare Part Name and its Unit Cost repeat 10 times i.e. 20fields like Part1&Cost1,Part2&Cost2................... Part10&Cost10 90% Part1&Cost1 to Part5&UCost5 fields are filled it means Part6&Cost6 to Part10&Cost10 are empty. in other words 10% Part1&Cost1 to Part10&Cost10 fields are filled. And ZSPR_PART and ZUNIT_CST are the single info objects for Part1 -10 and Cost1 -10 So I map the Part1 to ZSPR_PART and Cost1 to ZUNIT_CST in transformation only. And Write Start Routine as: LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>. IF <source_fields>-Part1 is NOT INITIAL AND <source_fields>-Cost1 IS NOT INITIAL . *Nothing to do ELSEIF <source_fields>-Part2 is NOT INITIAL AND <source_fields>-Cost2 IS NOT INITIAL . <source_fields>-Part1 = <source_fields>-Part2. <source_fields>-Cost1 = <source_fields>-Cost2. ELSEIF <source_fields>-Part3 is NOT INITIAL AND <source_fields>-Cost3 IS NOT INITIAL . <source_fields>-Part1 = <source_fields>-Part3. <source_fields>-Cost1 = <source_fields>-Cost3. ................................................... ................................................... ELSEIF <source_fields>-Part10 is NOT INITIAL AND <source_fields>-Cost10 IS NOT INITIAL . <source_fields>-Part1 = <source_fields>-Part10. <source_fields>-Cost1 = <source_fields>-Cost10. ENDIF. ENDLOOP. But it shows the following error: The data object "<SOURCE_FIELDS>" has no component called "Part2", but there is a component called "Part1". How to resolve this issue? | Reply to this email to post your response. __.____._ | _.____.__ |