Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartforms address

Former Member
0 Likes
660

Hi experts,

I have created ITAB to get the customer addresses.

Same structure(T_PVT) i have created in smartforms.


  call function '/1BCDWB/SF00000249'    
      tables     
       t_pvt = itab.

In the smartforms ,sap address number i have given &T_PVT-ADRNR& to get the address dynamically.While executing iam getting the error "Error in address output (name not filled)." But there are values in ITAB.

Where might be the problem?If i give direct address number ex: 24354 , iam getting the address.

Can i give &T_PVT-ADRNR& directly in the address number?Or is there any other way?

kaki

6 REPLIES 6
Read only

Former Member
0 Likes
642

Hi Kaki,

Try this :

Define A global variable at global data as

W_PVT TYPE T_PVT .

Add program lines(Shown Below) "before" your address text element or in the "initialization" .

<b>Read Table T_PVT into W_PVT index 1.</b> "W_PVT is work area

Then add &W_PVT-ADRNR& in address element.

You are not reading any entry in the internal table T_PVT hence there is no value assigned to variable &T_OVT-ADRNR&. You are getting an "error" in address output .

Hope this will help you.

Read only

0 Likes
642

Hi,

I tried this logic.Still iam getting error

"Error in address output (name not filled)".

Iam using this code in program lines.

<b>Read Table T_PVT into G_PVT index 1.</b>

and address number iam passing G_PVT-ADRNR.

If i give value directly,that is G_PVT-ADRNR = '39012'.

Iam getting the address.What i found is T_PVT is not getting read.But data is in it.

Where might be the problem?

Read only

0 Likes
642

Hi Kaki,

You should check the following things:

1. The structure u are using in ur smartform and ABAP program should be declared in the data dictionary (SE11).

2. You should then declare an itab 'LIKE' that structure in the TABLES tab in the FORM INTERFACE of ur smartform.

3. Now u can display the respective field of that itab.

Hope this helps to solve your problem.

Read only

0 Likes
642

Hi,

All these things are has been done.Iam trying to read the itab in the smartform(program lines).I did not understand why the READ statement not getting anything.

kaki

Read only

0 Likes
642

Hi,

Why don't you write the code to retrieve the address no in Smartform Code Window instead of writing in ABAP Program.

Regards,

Murali Krishna K.

Read only

Former Member
0 Likes
642

Hi,

Put Break point and check for the entries in T_PVT table.

If it contains any value then and only u get a record by read statement.

Regards,

Digesh Panchal