Population of the New/Used Indicator field
Please suggest me to code for the below requirment.
Population of the XGBR_AM (New/Used Indicator) is accomplished by finding the proper offset account
to the Fixed Asset clearing account '1000110000'. Using the value from Z1DSEG2-ZZEOSE for
the line item being processed, search the other line items in the inbound idoc
at the E1FISEG matching the value in Z1DSEG2-ZZEOSE to the E1FISEG-ZUONR field.
If a match is found and the value in E1FISEG-HKONT is '1000000012',
the indicator should be populated with 'A'.
If no match is found, use the value from the E1FISEG-ZUONR field on the line item being processed
and search the other line items in the inbound idoc to find a match at the E1FISEG-ZUONR
field level. If a match is found and the value in E1FISEG-HKONT is '1000000013'
then the indicator is 'B' else populate with an 'A'.
am writing code in include
Thanks in advance.