cancel
Showing results for 
Search instead for 
Did you mean: 

ltrim function in SAP BODS

07-25-2020 11:04 AM
2817 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Guru's

I have a issue in SAP BODS , please help me to resolve the issue..

Attached my input and output file format for your reference..

As I have column i.e. Material - we wanted to prefix "M" in front of all the Materials, If the Material is blank ...we have to make it as blank column (' ') as shown below output file results.

capture.png

I have applied 'M' || Ltrim(Query.Material,'M_') but this is giving wrong results. Please do the needful.

Regards,

Rag

.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

rajiv_deshpande
Explorer
0 Likes

Hi

Use this code in the Mapping of the Output Field.

decode(MaterialNo IS NULL, '', 'M' || to_char(MaterialNo))

The output field for Material should be varchar and it should be big enough to hold "'M'+Mat#"

Thank you

Rjaiv Deshpande

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Rajiv,

Thanks for your help...its working fine.....