2006 Mar 13 8:49 AM
hi im getting an error in smartforms like
" %CODE1: Unknown column name "ADRNR". not determined until runtime, you cannot specify a field list."
i does't know how to solve this plse guide me to get the address of S.O, this is the condition..
1)sap table :ADRC
calculation:
Use TVKO-ADRNR for function module
ADDRESS_INTO_PRINTFORM with
NUMBER_OF_LINES parameter = 4
TVKO-VKORG = VBAK-VKORG
2)sap table:adrc
field:tel_number
calculations:
ADRC-ADDRNUMBER = TKVO-ADRNR
TVKO-VKORG = VBAK-vkorg
3)sap table:adrc
field:fax_number
calculations:
ADRC-ADDRNUMBER = TKVO-ADRNR
TVKO-VKORG = VBAK-VKORG
many thanks
with regards
aaryaa
2006 Mar 14 7:33 AM
Hi,
VKORG value should come from driver program.Check whether you have the table VBAK derives any value through the mentioned below function module(in the Initialization Tab of Global Definitions)
CALL FUNCTION 'SF_GET_INTIT_DATA'.
Only in that case you can use it as an Input parameter in %CODE1.
Else link VBAK-VKORG field with any other table which has value for this field fetched from your driver program.
Regards,
Gayathri
Message was edited by: Gayathri Hariharan
2006 Mar 13 8:54 AM
Hi
Probably you haven't indicated the variable TVKO in abap code node.
Max
2006 Mar 13 8:54 AM
hi
I didnt get ur problem. Code u have mentioned must specify in code page of samrtform.
Regards
vinod
2006 Mar 13 9:02 AM
this is the code of the smartform plse guide me what is the input,output parameters and global definitions.
SELECT SINGLE adrnr
FROM adrc
INTO is_adrnr
where vkorg = vbak-vkorg.
SELECT SINGLE tel_number
FROM adrc
INTO is_telnumber
WHERE addrnumber = is_adrnr.
SELECT SINGLE fax_number
FROM adrc
INTO is_faxnumber
WHERE vkorg = TVKO-vkorg.
*CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
ADRSWA_IN =
ADDRESS_1 =
ADDRESS_2 =
ADDRESS_3 =
ADDRESS_TYPE = ' '
ADDRESS_NUMBER = is_adrnr
ADDRESS_HANDLE = ' '
PERSON_NUMBER = ' '
PERSON_HANDLE = ' '
SENDER_COUNTRY = ' '
RECEIVER_LANGUAGE = ' '
NUMBER_OF_LINES = 4
STREET_HAS_PRIORITY = ' '
LINE_PRIORITY = ' '
COUNTRY_NAME_IN_RECEIVER_LANGU = ' '
LANGUAGE_FOR_COUNTRY_NAME = ' '
NO_UPPER_CASE_FOR_CITY = ' '
IV_NATION = ' '
IV_NATION_SPACE = ' '
IMPORTING
ADRSWA_OUT =
ADDRESS_PRINTFORM = wa_ADRS_PRINT
ADDRESS_SHORT_FORM =
ADDRESS_SHORT_FORM_S =
ADDRESS_DATA_CARRIER =
ADDRESS_DATA_CARRIER_0 =
NUMBER_OF_USED_LINES =
NAME_IS_EMPTY =
ADDRESS_NOT_FOUND =
ADDRESS_PRINTFORM_TABLE =
ADDRESS_SHORT_FORM_WO_NAME =
EV_NATION =
.
2006 Mar 13 8:55 AM
Hi,
when you define a code in Smartforms, you have to set the input and the output. If you not define well this output you will have message like your.
Rgd
Frédéric
2006 Mar 13 9:00 AM
SELECT SINGLE adrnr
FROM adrc
INTO is_adrnr
where vkorg = vbak-vkorg.
SELECT SINGLE tel_number
FROM adrc
INTO is_telnumber
WHERE addrnumber = is_adrnr.
SELECT SINGLE fax_number
FROM adrc
INTO is_faxnumber
WHERE vkorg = TVKO-vkorg.
*CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
ADRSWA_IN =
ADDRESS_1 =
ADDRESS_2 =
ADDRESS_3 =
ADDRESS_TYPE = ' '
ADDRESS_NUMBER = is_adrnr
ADDRESS_HANDLE = ' '
PERSON_NUMBER = ' '
PERSON_HANDLE = ' '
SENDER_COUNTRY = ' '
RECEIVER_LANGUAGE = ' '
NUMBER_OF_LINES = 4
STREET_HAS_PRIORITY = ' '
LINE_PRIORITY = ' '
COUNTRY_NAME_IN_RECEIVER_LANGU = ' '
LANGUAGE_FOR_COUNTRY_NAME = ' '
NO_UPPER_CASE_FOR_CITY = ' '
IV_NATION = ' '
IV_NATION_SPACE = ' '
IMPORTING
ADRSWA_OUT =
ADDRESS_PRINTFORM = wa_ADRS_PRINT
ADDRESS_SHORT_FORM =
ADDRESS_SHORT_FORM_S =
ADDRESS_DATA_CARRIER =
ADDRESS_DATA_CARRIER_0 =
NUMBER_OF_USED_LINES =
NAME_IS_EMPTY =
ADDRESS_NOT_FOUND =
ADDRESS_PRINTFORM_TABLE =
ADDRESS_SHORT_FORM_WO_NAME =
EV_NATION =
.
2006 Mar 13 9:03 AM
Hi,
Define the Input output parameters correctly in the Program lines.
for eg:
move-corresponding DKADR to ADRS.
call function 'ADDRESS_INTO_PRINTFORM'
exporting
adrswa_in = adrs
importing
adrswa_out = adrs
exceptions
others = 04.For the code mentioned above :
DKADR is the input parameter
Adrs is the o/p parameter.
Regards,
Gayathri
2006 Mar 13 9:10 AM
Hi,
Define them in global definitions:
is_adrnr type adrc
is_telnumber type adrc
is_faxnumber type adrc
wa_adrs_print
O/P parameter:
wa_ADRS_PRINT
2006 Mar 13 9:28 AM
i done the same but still i am getting the same prob
2006 Mar 13 11:50 AM
Hi,
Pass is_adrnr in the o/p parameter.
In addition to that your VBAK should be given in the input parameter i.e. there should be value in field VBAK-VKORG.
The value in VBAK-Vkorg should be derived either from your print prigram or from previous nodes (i.e prior to your %CODE1 )in your smartform.Only in that case you can pass it as an i/p parameter.
Hope this helps you.
Regards,
Gayathri
2006 Mar 14 5:28 AM
hi gayathri
many thanks for ur reply.
plse guide me how to proceed to get vkorg value
2006 Mar 14 7:33 AM
Hi,
VKORG value should come from driver program.Check whether you have the table VBAK derives any value through the mentioned below function module(in the Initialization Tab of Global Definitions)
CALL FUNCTION 'SF_GET_INTIT_DATA'.
Only in that case you can use it as an Input parameter in %CODE1.
Else link VBAK-VKORG field with any other table which has value for this field fetched from your driver program.
Regards,
Gayathri
Message was edited by: Gayathri Hariharan
2006 Mar 16 12:10 PM
Hi Gayathri Hariharan
many thanks for your idea.i completed my task.
now i got another object,which does't have standard form and its driver program.so plse guide me how to find driver program.i tryed with NACE i got some standard prog's but from that how to find driver prog'm which is suitable to us.
many thanks
by aaryaa
2006 Mar 16 12:26 PM
HI,
Do you have the smartform name?
If you have the same
Use TNAPR Table.
In that give ur Smartform Name then u will get Driver Program Name.
Regards,
Gayathri