Application Development 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: 

UNPACK

Former Member
0 Kudos

what is the use of UNPACK??

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi joseph,

If ur variable is of type C and size 10 and the value of that variable is 3456.

when u display it it will come by 3456.

but if u use unpack var to var.

then the value will be 0000003456.

4 REPLIES 4

Former Member
0 Kudos

Hi joseph,

If ur variable is of type C and size 10 and the value of that variable is 3456.

when u display it it will come by 3456.

but if u use unpack var to var.

then the value will be 0000003456.

amit_khare
Active Contributor
0 Kudos

Welcome to SDN.

Check this link -

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

hi..

<b>Please check these out<b></b>..</b>

/people/horst.keller/blog/2004/10/18/abap-geek-1--abap-program-attributes

<b>Reward points if useful</b>

Regards

Ashu

former_member198270
Active Contributor
0 Kudos

Hi Frankln,

Please find the piece of code .

LOOP AT it_mara INTO wa_mara.

************************************************************

  • this syntax is used for truncating leading zeros like

  • '0000000018' = '18'. but if data is like 'ABCD' then

  • it gives Dump.

**pack wa_mara-matnr to e_matnr.

************************************************************

******************************************************************

          • this function module changes matnr '00000018' = '18'

  • 'ABCD' = 'ABCD'

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = wa_mara-matnr

IMPORTING

output = e_matnr.

*******************************************************************

WRITE:/ e_matnr ,

25 wa_mara-mtart ,

45 wa_mara-meins .

ULINE.

WRITE:/65 'Plant' .

LOOP AT it_marc INTO wa_marc.

WRITE:/65 wa_marc-werks.

ENDLOOP.

Reward Points if Helpful .

Regards,

Amber S