Skip to Content
author's profile photo Former Member
Former Member

Ref table & field ina structure

Hi,

I've a quantity field in a standard structure. As reference field it has 'unit' field from another structure.

Is it possible to display the units along with quantity in an ABAP report?

Regards..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2006 at 12:02 PM

    Hi,

    Sample Program to disply the Units ..

    REPORT demo_list_write_unit LINE-SIZE 40.
    
    DATA: num1 TYPE p DECIMALS 1 VALUE 1,
          num2 TYPE p DECIMALS 4 VALUE '2.5'.
    
    SET COUNTRY 'US'.
    
    WRITE: 'KG', num1 UNIT 'KG', num2 UNIT 'KG',
         / 'PC', num1 UNIT 'PC', num2 UNIT 'PC'.
    

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

    This Program is for Currency

    REPORT demo_list_write_currency LINE-SIZE 40.
    
    DATA: num1 TYPE p  DECIMALS 4 VALUE '12.3456',
          num2 TYPE p  DECIMALS 0 VALUE '123456'.
    
    SET COUNTRY 'US'.
    
    WRITE: 'USD', num1 CURRENCY 'USD', num2 CURRENCY 'USD',
         / 'BEF', num1 CURRENCY 'BEF', num2 CURRENCY 'BEF',
         / 'KUD', num1 CURRENCY 'KUD', num2 CURRENCY 'KUD'.
    

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2006 at 11:59 AM

    YOu can use the write statement this way:

    write: v_quan unit v_unit.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.