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

Smart Form Urgent??

Hi Exeprts,

In Smart I have to display like below

SNo PO mat Qty

1...101..AB..10

.........cd..20

.........df..34

2...102..dv..45

..........qt..56

Dots are nothing but spaces.Assume all above are in incorporated in tables.

Here see for each purchase order number we have multiple line items ie Material and quantity.

<b>So what logic I have to follow for display in smartforms. Please post ur answers as soon as possible. <b>Its very very urgent</b></b>

Thanks in Advance

Sanju.

Message was edited by:

sanjana K

Message was edited by:

sanjana K

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Sep 10, 2007 at 04:06 AM

    You can acheive it in different ways...

    1)Try to create program lines and create a new internal table similar to the structure that is holding your data...

    Now loop your internal table....

    Ex: LOOP AT itab.

    AT NEW SNO.

    itab1-sno = itab-sno.

    itab1-po = itab-po.

    ENDAT.

    itab1-mat = itab-mat.

    itab1-qty = itab-qty.

    Append itab1.

    CLEAR itab1.

    ENDLOOP.

    Note: now itab1 will have the contents as shown below... display itab1...

    OR

    2) Using control break-staments by ticking the appropriate check boxes.....

    Close the thread if your question is answered.

    Regards,

    SaiRam

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 04:46 AM

    hi,

    try to use control break statements for ur requirement.

    try like this,

    create a internal table[with header line] with fields SNo PO mat Qty and while u display o/p

    data: flag type c .

    LOOP AT itab.

    AT NEW SNO.

    write: 20 itab-mat,

    30 itab-qty.

    flag = 'X'.

    ENDAT.

    if flag NE 'X'.

    write:/10 itab-sno,

    20 itab-mat,

    30 itab-aty.

    endif.

    Append itab.

    CLEAR itab.

    ENDLOOP.

    If helpful reward some points.

    With regards,

    Suresh Aluri.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2007 at 05:11 AM

    Hi Sanjana,

    Follow the approach-

    Step1 - Sort internal table on PO before passing to smartform.

    Step2 - Declare global variables g_PO and g_SR in smartform.

    Step3 - Add Element-Program lines before text element in cell for serial no.

    Write code in this -

    if <WA>-PO <> g_PO.

    g_SR = g_SR + 1.

    endif.

    Step4 - Set conditions on text of SNo and PO that

    g_PO <> <WA>-PO

    Step5 - Add Element-Program lines after text element in cell for PO

    Write code in this -

    g_PO = <WA>-PO

    I hope this helps you. Plz do revert back in case of any queries.

    Best Regards,

    Manish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 06:53 AM

    One thing u can do is,

    Add one extra field into your internal table of ineger type,

    And do coding into the program so that it will have content like

    Con PO Mat Qty

    1 101 AB 10

    0 101 CD 20

    0 101 DF 34

    1 102 DV 45

    0 102 Qt 56

    Now in the Smart form in the field of SrNo and PO number write the condition that itab-con = '1'

    So your required o/p will come

    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.