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

Accepted Solutions (1)

Accepted Solutions (1)

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.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sameera,

Please check the window size and harcode the BREAK-POINT.code in the samart form editor where you pass the field value and check whether same value is there in samrt form.

If not please check your window size once

Regards,

Rasheed.

Former Member
0 Kudos

hi,

try to take a break point and make sure all ur values are comming to smart form also.

once again check the table type which u have declare for wa_header.

Former Member
0 Kudos

hi,

try to take a break point and make sure all ur values are comming to smart form also.

once again check the table type which u have declare for wa_header.

Former Member
0 Kudos

Hi I have not clear still.

Former Member
0 Kudos

Hi Sameera,

Have you passed the internal table to the form interface to the smartform.

Regards,

Sravanthi

Former Member
0 Kudos

Hi sravanthi,

After passing the internal table to my function module.still also am not getting the values.In debugging all the values are coming.

only the thing is that values have to be displayed into my form.

regards.

Former Member
0 Kudos

The other day after I mentioned in the code that some of the values are not being passed to the internal table..did u check that?

Regards,

Vishwa.

Former Member
0 Kudos

HI sravanthi,

I am passing my internal table to the function module paramater. and every thing is fine.Values are coming when I debug my driver program.But they are not printing into my form.

Plz help me with ur valuable inputs.

Regards.

Edited by: Sameera shaik on Nov 5, 2008 12:43 PM

Former Member
0 Kudos

Hi Sameera,

Since the data is available in the internal table which you are passing to the FM, then the data should be available in side the smartform also. Check this whether the data is available in

smartform or not.

If the data is available, you might be using Table for displaying the data.

1)Check the conditions in the where clause are not satifying if any

2) Check the table type is having all the required columns.

Regards,

Dinakar.

Former Member
0 Kudos

Hi Dinakar,

Thanks for ur reply.When i am debugging all the values I am getting and i am passing that itab to function module parameter Tables.

Then also am not getting the values in my form.

Regards,

Sammu.

Edited by: Sameera shaik on Nov 6, 2008 12:35 PM

Former Member
0 Kudos

Hi,

Some where the SPACE was moved to the corresponding variables.may be same variables r used to more than one time or increase the height of the window.