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

Former Member
0 Likes
1,693

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,416

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

13 REPLIES 13
Read only

Former Member
0 Likes
1,416

Hi

Probably you haven't indicated the variable TVKO in abap code node.

Max

Read only

vinod_gunaware2
Active Contributor
0 Likes
1,416

hi

I didnt get ur problem. Code u have mentioned must specify in code page of samrtform.

Regards

vinod

Read only

0 Likes
1,416

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 =

  • .

Read only

FredericGirod
Active Contributor
0 Likes
1,416

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

Read only

0 Likes
1,416

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 =

  • .

Read only

Former Member
0 Likes
1,416

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

Read only

Former Member
0 Likes
1,416

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

Read only

0 Likes
1,416

i done the same but still i am getting the same prob

Read only

Former Member
0 Likes
1,416

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

Read only

0 Likes
1,416

hi gayathri

many thanks for ur reply.

plse guide me how to proceed to get vkorg value

Read only

Former Member
0 Likes
1,417

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

Read only

0 Likes
1,416

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

Read only

Former Member
0 Likes
1,416

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