‎2014 Feb 26 12:10 PM
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
‎2014 Feb 26 12:40 PM
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.
‎2014 Feb 26 12:18 PM
Kindly check for global variables in debugger or can you please explain more with exact screen shots.
‎2014 Feb 26 12:19 PM
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
‎2014 Feb 26 12:23 PM
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.
‎2014 Feb 26 12:29 PM
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.
‎2014 Feb 26 12:32 PM
‎2014 Feb 26 12:45 PM
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.
‎2014 Feb 26 12:54 PM
Oh okay Manish, Can you please update the document with detailed inputs.
Regards,
TP
‎2014 Feb 26 1:10 PM
No i won't. The blog conveys exactly the issue faced and the approach taken to ease the situation.
‎2014 Feb 26 12:35 PM
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.
‎2014 Feb 26 12:37 PM
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
‎2014 Feb 26 12:39 PM
Hi,
The requirement is attach a customized smartform into F150. There is no driver program in nace.
Regards
Mani
‎2014 Feb 26 1:07 PM
Hi Mani,
please go through these links , it will help you in achieving your goal.
Attaching the Invoice Smartforms  to Dunni... | SCN
Dunning with SAP Smart Forms (SAP Library - Release notes 46C)
‎2014 Feb 26 12:40 PM
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.
‎2014 Feb 26 12:51 PM
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
‎2014 Feb 26 12:56 PM
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.
‎2014 Feb 26 1:06 PM
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.
‎2014 Feb 26 1:18 PM
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