‎2013 Oct 04 1:06 PM
Hi all,
i have a requirement that in my smarform shown in screenshot, i have various values of
quotataion no for a single value of PR. But as you can see i can only able to show six set
of quotation in my smartforms which i can print in A4 size paper.
But my requirement is that if i will get more than six values of quotation no.(ebeln),
then i can print it in A3 size paper, but for the same purpose i will need dynamic column .
I have searched various thread in this forum but didn't get my answer.So if anyone can sujjest me what
what changes i have to perform for the same purpose, as in screenshot i have got one set of values
for single values of "ebeln", but i don't know how could i do to get for multiple values of "ebeln",
and what if my quotation value will exceeds more than six.
‎2013 Oct 04 2:39 PM
Hi,
It look like an internal form so I suggest you tell your
people that the form can be redesign so all the variable columns will become rows
this way the cost of development and complexity can be reduces dramatically .
Also you will be saving paper (Be greener) since you will able (from my impression) to print more then 6 quotations on the same page.
Regards.
‎2013 Oct 04 2:39 PM
Hi,
It look like an internal form so I suggest you tell your
people that the form can be redesign so all the variable columns will become rows
this way the cost of development and complexity can be reduces dramatically .
Also you will be saving paper (Be greener) since you will able (from my impression) to print more then 6 quotations on the same page.
Regards.
‎2013 Oct 04 3:09 PM
Hi Sanjeev,
Capture all Field Name into Internal table , I mean ITAB1 is One Set of Field's , ITAB2 is Second Set Of Field and these Internal tables passed into smartforms as per your condition .
Example :
If Condition A= B
Use ITAB1 Field Names.
ELSE.
Use ITAB2 Field names .
endif .
Regard's
Smruti
‎2013 Oct 05 8:45 AM
Hi Smruti,
can you please tell me clearly how could i will achieve, because let i have six records in first
conditions, and ten records in my second conditions, now i have to use commands to fetch all
the values in its respected fields......so i have to use different variables in commands for each values
of quotation no or i can acheive it through a single variable based on conditions.
Here is the code of my driver program where i have selected each field.
Can you please sujjest me how could i write my program to achieve this
SELECT BANFN
EBELN
FROM EKET
INTO CORRESPONDING FIELDS OF TABLE IT_EKET
WHERE BANFN IN S_BANFN.
*BREAK abap.
IF IT_EKET[] IS NOT INITIAL.
SELECT EBELN
WAERS
ANGDT
ZTERM
LIFNR
BUKRS
FROM EKKO
INTO CORRESPONDING FIELDS OF TABLE IT_EKKO
FOR ALL ENTRIES IN IT_EKET
WHERE EBELN = IT_EKET-EBELN
AND BSTYP = 'A'.
IF SY-SUBRC NE 0.
IF IT_EKKO IS INITIAL.
MESSAGE 'No suitable records exists for given Indent Number' TYPE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
IF SY-SUBRC = 0.
*ELSEIF IT_EKKO IS NOT INITIAL.
SELECT EMATN
TXZ01
KTMNG
MEINS
NETPR
ZWERT
EBELN
MWSKZ
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE IT_EKPO
FOR ALL ENTRIES IN IT_EKKO
WHERE EBELN = IT_EKKO-EBELN.
SELECT BADAT
BANFN
FROM EBAN
INTO CORRESPONDING FIELDS OF TABLE IT_EBAN
FOR ALL ENTRIES IN IT_EKET
WHERE BANFN = IT_EKET-BANFN.
SELECT EVRTN
KNUMH
FROM A016
INTO CORRESPONDING FIELDS OF TABLE IT_A016
FOR ALL ENTRIES IN IT_EKKO
WHERE EVRTN = IT_EKKO-EBELN.
SELECT KNUMH
KBETR
KSCHL
FROM KONP
INTO CORRESPONDING FIELDS OF TABLE IT_KONP
FOR ALL ENTRIES IN IT_A016
WHERE KNUMH = IT_A016-KNUMH.
SELECT BUTXT
BUKRS
FROM T001
INTO CORRESPONDING FIELDS OF TABLE IT_T001
FOR ALL ENTRIES IN IT_EKKO
WHERE BUKRS = IT_EKKO-BUKRS.
ENDIF.
**ENDIF.
‎2013 Oct 05 5:46 AM
‎2013 Oct 05 6:02 AM
Hi,
Just an idea.
HTML can be generated dynamically.
So you can generate a very nice looking HTML page and ask the user to print it using
the Internet browser.
Regards.
‎2013 Oct 05 8:36 AM
Hi Eitan,
thanks for your reply, but i don't want to let user use a html,
our requirement is to make it through smartforms.
‎2013 Oct 05 8:51 AM
Hi,
Well the only thing that I am going to say is that I do not envy you on this one.....
Please keep us updated on this development. It will be interesting.....
Regards.
‎2013 Oct 06 11:18 AM
Hi,
Have a look here this is new...
http://scn.sap.com/community/abap/blog/2013/10/06/the-case-of-dynamic-columns-in-smartform
Regards.