cancel
Showing results for 
Search instead for 
Did you mean: 

printing values in smart form

Former Member
0 Kudos

Hi,

I am new to smart forms.while I am debugging the driver program all the values are coming and after moving all that values also data is coming in final internal table.But they are not printing in the smart form.In smart form I assigned all the appropriate fields also.every thing is fine only values have to be displayed into the smart forms.

only some values are picking from the internal table but not all.

Plz can u help me what may be the problem?

advance thanks

sammu.

Edited by: Sameera shaik on Oct 31, 2008 11:03 AM

View Entire Topic
Former Member
0 Kudos

Hi

Are u passing this final internal table to the Smartform generated Function Module??

And before that, did u declare the internal table in the Tables tab of the Form Interface?

Regards,

Vishwa.

Former Member
0 Kudos

Hi Vishwa

thanks for ur fast reply.

I did every thing.I am passing the final internal trable in the function module and every thing is ok.I am getting some values also from that internal table.only some values they are not printing.

Plz.........

regards

sammu.

Edited by: Sameera shaik on Oct 31, 2008 11:14 AM

Former Member
0 Kudos

Ok.

What are the values that are not printing? Are they Currency or Quantity fields....??

Just check how they are given in the smartform.

Vishwa.

Former Member
0 Kudos

HI vishwa?

I am printing address from adrc and t005t and t005u tables

so in address table name1 and post_code1 fields are printing but rest of the fields are not printing.

Regards

Sammu.

Former Member
0 Kudos

Hi

Sometimes, IF the data is not completely filled also, blank spaces come..

Instead....

To print an address in the smartform..you have an node called Address Node...which you need to use.

If you pass the address number to the adress node...It will display the address.

You have to retrieve the address number based on vendor/customer.

The vendor's master is LFA1 and customer master table is KNA1.

Small Example:

DATA l_lfa1 LIKE lfa1.
DATA l_lfm1 LIKE lfm1.

IF is_ekko-adrnr IS INITIAL.
IF  is_nast-parnr NE space AND
is_nast-parnr NE is_ekko-lifnr.
SELECT SINGLE * FROM lfa1 INTO l_lfa1
WHERE lifnr = is_nast-parnr. " here retreiving values based on vendor number
IF sy-subrc = 0.
MOVE l_lfa1-adrnr TO gv_addnr_vendor." passing the address number to the variable declared for the same reason.
ENDIF.

The code to retreive can be written in Program Lines node of the smartform..

And then in the address node pass the variable as: &gv_addnr_vendor&.

Regards,

Vishwa.

Former Member
0 Kudos

Hi vishwa. this is my code which i am trying to print.

In debugging all the values are coming but while printing the address only name1 and post_code1 are getting printed.

SELECT vbeln

adrnr

parvw FROM vbpa

INTO TABLE it_vbpa

WHERE vbeln = wa_lips-vbeln

AND parvw IN ('WE' , 'AG' ).

IF it_vbpa[] IS NOT INITIAL.

SELECT addrnumber

name1

name2

city1

post_code1

street

region

country FROM adrc

INTO TABLE it_adrc

FOR ALL ENTRIES IN it_vbpa

WHERE addrnumber = it_vbpa-adrnr.

IF sy-subrc EQ 0.

SELECT spras

land1

landx FROM t005t

INTO TABLE it_t005t

FOR ALL ENTRIES IN it_adrc

WHERE spras = sy-langu

AND land1 = it_adrc-country.

ENDIF.

ENDIF.

IF sy-subrc EQ 0.

DELETE ADJACENT DUPLICATES FROM it_t005t COMPARING ALL FIELDS.

ENDIF.

SELECT spras

bezei

bland

land1

FROM t005u

INTO TABLE it_t005u

FOR ALL ENTRIES IN it_adrc

WHERE spras = sy-langu

AND bland = it_adrc-region

AND land1 = it_adrc-country.

IF sy-subrc EQ 0.

DELETE ADJACENT DUPLICATES FROM it_t005u COMPARING ALL FIELDS." bezei.

ENDIF.

SORT it_vbpa BY parvw.

DELETE ADJACENT DUPLICATES FROM it_vbpa COMPARING parvw.

LOOP AT it_vbpa INTO wa_vbpa.

IF wa_vbpa-parvw = 'AG'.

READ TABLE it_adrc INTO wa_adrc WITH KEY addrnumber = wa_vbpa-adrnr.

IF sy-subrc EQ 0.

MOVE:wa_adrc-name1 TO wa_header-inv_name1, "6

wa_adrc-name2 TO wa_header-inv_name2, "6

wa_adrc-street TO wa_header-inv_street,"6

wa_adrc-post_code1 TO wa_header-inv_post_code1, "6

wa_adrc-city1 TO wa_header-inv_city1. "6

READ TABLE it_t005u INTO wa_t005u WITH KEY spras = sy-langu

bland = wa_adrc-region

land1 = wa_adrc-country.

IF sy-subrc EQ 0.

MOVE wa_t005u-bezei TO wa_header-inv_region. "6

ENDIF.

READ TABLE it_t005t INTO wa_t005t WITH KEY spras = sy-langu

land1 = wa_adrc-country.

IF sy-subrc EQ 0.

MOVE wa_t005t-landx TO wa_header-inv_country.

ENDIF.

ENDIF.

ENDIF.

How can i rectify it.

Regards,

Sammu.

Former Member
0 Kudos

Hi

Here:

IF wa_vbpa-parvw = 'AG'.
READ TABLE it_adrc INTO wa_adrc WITH KEY addrnumber = wa_vbpa-adrnr.
IF sy-subrc EQ 0.
MOVE:wa_adrc-name1 TO wa_header-inv_name1, "6
wa_adrc-name2 TO wa_header-inv_name2, "6
wa_adrc-street TO wa_header-inv_street,"6
wa_adrc-post_code1 TO wa_header-inv_post_code1, "6
wa_adrc-city1 TO wa_header-inv_city1. "6
READ TABLE it_t005u INTO wa_t005u WITH KEY spras = sy-langu
bland = wa_adrc-region
land1 = wa_adrc-country.  "you did not move wa_t005u-bland,land1 to wa_header strucure right???...
IF sy-subrc EQ 0.
MOVE wa_t005u-bezei TO wa_header-inv_region. "6 
ENDIF.
READ TABLE it_t005t INTO wa_t005t WITH KEY spras = sy-langu
land1 = wa_adrc-country.
IF sy-subrc EQ 0.
MOVE wa_t005t-landx TO wa_header-inv_country.
ENDIF.
ENDIF.
ENDIF.

I think you are not moving all values to wa_header. If I am not wrong this is the one you are passing to FM...right??

Regards,

Vishwa.