cancel
Showing results for 
Search instead for 
Did you mean: 

Coding Initialization on smartforms

Former Member
0 Kudos

IF i wnat to write the coding in the initialiazation part of my developed smartform......what are the stpes for the coding?

Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:39 PM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

In smartforms->under global settings.->global definitions

In that under Global data-> u need to declare the data (work area and internal table)

In Types-> u declare the structure

And in the initialization tab... write the select query and specify the output parameters like itab (i.e into where u are keeping the data)

Regards

Sravani

Plz reward points if helpful...

Former Member
0 Kudos

Go to Global Definations

-


> Initialization Tab

Just give input and output parameters.

Declare same as ABAP Editor.

write u r required code. pass it to output parameters.

it will work.

if u need to write extra code.

GOTO --> Form Routine Tab,

there u can write the code same as ABAP Editor

with Regards,

Kiran.G

Former Member
0 Kudos

Hi,

For that u have to pass the Input and Output Parameters which are declared in global definations.

Lets Take an Example:

In Input Parameters -->GV_KUNNR1

Output Parameter-->GV_NAME

Write the code in Initialization


PERFORM GET_INVOICE_CUSTOMER_NAME USING GV_KUNNR1 CHANGING GV_NAME.

In Form Routine Write


*---------------------------------------------------------------------*
*      Form  GET_INVOICE_CUSTOMER_NAME
*---------------------------------------------------------------------*
* Populate The Invoice Customer Name
*---------------------------------------------------------------------*
*  --> pr_kunnr    Incoming parameter
*  <--pr_v_name    Outgoing Parameter
*---------------------------------------------------------------------*


FORM get_invoice_customer_name USING pr_kunnr TYPE kunnr
CHANGING pr_v_name TYPE ad_name1.

SELECT SINGLE
name1
FROM adrc
INTO pr_v_name
WHERE addrnumber = pr_kunnr.

ENDFORM.                    "GET_INVOICE_CUSTOMER_NAME

Regards

Sandipan

Former Member
0 Kudos

Hi,

In smart forms under global settings global definition is there.

open global definitions in that you have option Intilization tab .

you can what ever code you want like initilization event in reports.

definetly it will usefull.

REWARD POINTS.

Sm1tje
Active Contributor
0 Kudos

define the import / export parameters (should be globally declared) and do the coding like in any other editor environment (SE38 / SE80 / SE37. etc.).