on 2015 Jul 23 1:43 PM
Hi,
I am load data from a flatfile to BW.One of the field in flat file is Char 30 and free text.
In BW Transformation based conditions on the Free Text I need to populate another field as I am not expert in ABAP what is the logic I should use in the routine
In source field = *INVOICE* or *Invoice* or *invoice* then target field should be ‘I’
Thanks
Request clarification before answering.
IF <source_field> CP '*INVOICE*'
OR <source_field> CP '*Invoice*'
OR <source_field> CP '*invoice*'.
<target_field> = 'I'.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use BW Formula as LEFT(Source system field, 1) , it will pick the first character from the left. try this option also.
Thanks and Regards,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try as below,
Result = <Source_Fields>-Invoice + 0(10) like this
Meaning it will read Invoice Field starting from first character to 10 characters. Please modify the code how much length you require.For example the above code can use to bring 3rd to 21 characters also +3(18) like that.
Thanks and Regards,
Mahesh
Hi SAP User,
I think as per your reuqirement you will have to do couple of things here:
1. Translate your source field to Uppercase.
2. Search for the string INVOICE
if yes then assign 'I' to result.
In code it could look like: (just an example)
----------------------------------------------------------------------
DATA: sf TYPE c LENGTH 30.
data: result TYPE c.
sf = 'asdfjinveoicekasdog134895'.
TRANSLATE sf TO UPPER CASE.
IF sf CS 'INVOICE'.
result = 'I'.
ENDIF.
----------------------------------------------------------------------
Thanks
Amit
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.