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

Data not picking from a table

Former Member
0 Likes
4,475

Hi Experts,

I have attached a customized smartform to a standard driver program. I have picked few fields from adrs table but when I try to pick telf1 from kna1, it says this field is unknown. I tried with &kna1-telf1& and &e_kna1-telf1& but it says the field in unknown.

In debugger, the values in kna1 are coming. Please suggest.

Regards

Mani

1 ACCEPTED SOLUTION
Read only

former_member187748
Active Contributor
0 Likes
4,406

Hi Mani,

why not you simply pass the value of customer (kunnr) in kna1 and pick telephone no( telf1) simply.

The error you are showing is different, declare this field in output parameters, and in

global declaration properly.

i means to say that, in the program lines where you have used kna1-telf1, in that

output parameters, put this variable, please see below,

and also check that this variable has been defined in the global definition or not.

17 REPLIES 17
Read only

Former Member
0 Likes
4,406

Kindly check for global variables in debugger or can you please explain more with exact screen shots.

Read only

former_member187748
Active Contributor
0 Likes
4,406

Hi Mani,

you have written that you " I have picked few fields from adrs table but when I try to pick telf1 from kna1, it says this field is unknow"

As far as i know there is no table called as adrs

Read only

0 Likes
4,406

Nice catch Sanjeev,

As ADRS is structure to save address,  I think what Mani means is structure only.

He is getting values in these structures through this FM. He is able to use values from ADRS but not from KNA1. That is the issue.

Read only

Former Member
0 Likes
4,406

Hi Mani,

As per my understanding you can not use KNA1 as that is local to this function module.

Could please explain in details exactly where you are using this thing.

Read only

ThangaPrakash
Active Contributor
0 Likes
4,406

Hello Mani,

There is a very detailed document prepared by on how to see the global internal table data in debugging.

Check it, very useful document, it might help you.

Reagrds,

Thanga

Read only

0 Likes
4,406

The document has received poor ratings so far.

It is not that detailed and deals only with specific case of checking huge number of internal tables.

In addition, the document does not have anything that could help Mani Bhushan.

Read only

0 Likes
4,406

Oh okay Manish, Can you please update the document with detailed inputs.

Regards,

TP

Read only

0 Likes
4,406

No i won't. The blog conveys exactly the issue faced and the approach taken to ease the situation.

Read only

former_member187748
Active Contributor
0 Likes
4,406

Hi Mani,

have you used this function module just by copy pasting from anywhere,

please elaborate your requirements for use of this function module.

What exactly you wants, please tell us clearly.

Read only

0 Likes
4,406

Hi,

Apologies for the late reply.

Adrs is a structure. What I mean is the values are coming from adrs but not from kna1. I need to pick the phone number. Please suggest. Do let me know for any screenshots.

Regards

Mani

Read only

0 Likes
4,406

Hi,

The requirement is attach a customized smartform into F150. There is no driver program in nace.

Regards

Mani

Read only

0 Likes
4,406
Read only

former_member187748
Active Contributor
0 Likes
4,407

Hi Mani,

why not you simply pass the value of customer (kunnr) in kna1 and pick telephone no( telf1) simply.

The error you are showing is different, declare this field in output parameters, and in

global declaration properly.

i means to say that, in the program lines where you have used kna1-telf1, in that

output parameters, put this variable, please see below,

and also check that this variable has been defined in the global definition or not.

Read only

0 Likes
4,406

Hi Sanjeev,

I appreciate your reply. Please check the following:

data: gt_kna1 type TABLE OF kna1.



select kunnr telf1 from kna1

  into table gt_kna1

  where kunnr = I_mhnk-kunnr.

It says I_mhnk-kunnr is unknown. How to do it?

Regards

Mani

Read only

0 Likes
4,406

Hi Mani,

please see mani, i think the variable you have used i_mhnk is a structure

that I_MHNK is an structure, and you can not pass data from a structure

please make i_mhnk as a part of any internal table then, use it.

it will surely solve your issue, please understand the difference between

a structure and a table.

Please revert if i am wrong.

Read only

0 Likes
4,406

It says I_mhnk-kunnr is unknown. How to do it?

if issue is this i think you missed it to mention I_mhnk in INPUT PAREMETERS.(in same place where sanjeev mentioned wa and vbeln)

mention  I_mhnk there in input paremeters and check if it gives same error.

Read only

0 Likes
4,406

Hi All,

It has worked.

select telf1 from kna1

  into gs_telf1

  where kunnr = mhnk-kunnr.

  ENDSELECT.

I have a doubt. I will ask tomorrow. Will close the thread later. Thank you experts.

Regards

Mani