Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IDOC

Former Member
0 Likes
775

I have a requirement where I am populating the data in to the IDOC of a field with <b>sign</b> as in <b>-</b> or <b>+</b>.

As we all know that the sign in SAP comes to the <b>right</b> of the value.

But I need to get the sign on the <b>left</b> side of the field.

I want to know if there is any option in the IDOC where we can do that to the field or we have to do that to the field directly when we are populating the values into to the IDOC.

So in the IDoc, I need the value to be -25.00 versus 25.00-

Can you tell me how this can be achieved?

Help required urgently.

Thanks,

Sneha.

Message was edited by:

Sneha Singh

1 ACCEPTED SOLUTION
Read only

former_member187255
Active Contributor
0 Likes
744

Sneha,

I think you need to handle this when u populate those values........

you can try any of this...

Report ZTEST.

data : lv_amount type wrbtr value '-1.00'.

data : lv_amount_new(20) type c .

WRITE lv_amount using edit mask 'LLV_________.__' to lv_amount_new.

write lv_amount_new.

Or you can use FM <b>CLOI_PUT_SIGN_IN_FRONT</b>

Hope this helps..

Chandra.

Sneha,

I think you need to handle this when u populate those values........

you can try any of this...

Report ZTEST.

data : lv_amount type wrbtr value '-1.00'.

data : lv_amount_new(20) type c .

WRITE lv_amount using edit mask 'LLV_________.__' to lv_amount_new.

write lv_amount_new.

Or you can use FM <b>CLOI_PUT_SIGN_IN_FRONT</b>

Hope this helps..

Chandra.

5 REPLIES 5
Read only

former_member187255
Active Contributor
0 Likes
745

Sneha,

I think you need to handle this when u populate those values........

you can try any of this...

Report ZTEST.

data : lv_amount type wrbtr value '-1.00'.

data : lv_amount_new(20) type c .

WRITE lv_amount using edit mask 'LLV_________.__' to lv_amount_new.

write lv_amount_new.

Or you can use FM <b>CLOI_PUT_SIGN_IN_FRONT</b>

Hope this helps..

Chandra.

Read only

Former Member
0 Likes
744

Hi,

You can just use concatenate statement. IDoc segment is in character format.


...
data: wa_e1edp01 like e1edp01.

loop at itab_edidd where segnam = 'E1EDP01'. 
  wa_e1edp01 = itab_edidd-sdata. 

  if not wa_e1edp01-netwr is initial. 
    concatenate '-' wa_e1edp01-netwr into wa_e1edp01-netwr. 
    itab_edidd-sdata = wa_e1edp01-netwr. 
    modify itab_edidd.
    exit.
  endif.

endloop.
...

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
744

It will be tough job to make symbol in left side since it is not a report program.

you need to find out the user exit,then currency field is not charcter field.

You need to declare one data variable like type char.

move ur currency value to char data variable and use FM CLOI_PUT_SIGN_IN_FRONT

Now modify the segment.

Try to find out user exit for IDOC.

Just use customer-function ( Search ) in search pattern in se37 idoc fm,then you may get list of user exits.

Thanks

Seshu

Read only

Former Member
0 Likes
744

Hi Seshu Maramreddy,

Can you tell me more clearly once??

Thanks,

Sneha.

Read only

0 Likes
744

Try to find out user exit and do the modfication.

here you can use FM and this will put symbol in left side.

Just look at Ferry Code and use same logic in user exit.

Thanks

Seshu