‎2007 Aug 01 3:45 PM
hai friends
1. in script we can use start_form and end_form insted of that how we use
this in smart forms.
2. in script how we give colour to the letters.
thanks
geetha
‎2007 Aug 01 3:54 PM
HI
after creating the smartform when we activate it a FM is generated .
we can find its name in environment tab of the menu items.
then in our report program we just call this fm.
for example:
report z71682_smartform.
tables vbrk.
data : lt_vbrk type standard table of vbrk,
lt_vbrp type standard table of vbrp,
lt_adrc type standard table of adrc,
lv_adrnr type kna1-adrnr,
wa_vbrk type vbrk,
wa_vbrp type vbrp,
wa_adrc type adrc.
data : var_fmname type rs38l_fnam.
select-options so_vbeln for vbrk-vbeln.
select vbeln
fkdat
kunrg
xblnr
waerk
from vbrk
into corresponding fields of table lt_vbrk
where vbeln in so_vbeln.
loop at lt_vbrk into wa_vbrk.
select single adrnr from kna1 into lv_adrnr where kunnr = wa_vbrk-kunrg.
select matnr
arktx
fkimg
vrkme
netwr
from vbrp
into corresponding fields of table lt_vbrp
where vbeln = wa_vbrk-vbeln.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'z71682_smartform3'
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = var_fmname
exceptions
no_form = 1
no_function_module = 2
others = 3
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function '/1BCDWB/SF00000156'
exporting
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
wa_vbrk = wa_vbrk
l_adrnr = lv_adrnr
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
tables
lt_vbrp = lt_vbrp
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
2. and for color in script you need to creat styles.
regards
vijay
<b>reward points if helpful</b>
‎2007 Aug 01 3:47 PM
Hi
1. in script we can use start_form and end_form insted of that how we use
this in smart forms.
Instead of start and end forms call the function module which you will get when u execute the smartform, then give in tables option the table name, the smartform will get displayed.
Regards
Haritha.
‎2007 Aug 01 3:48 PM
Hi,
1) In the Smartform a generated function module will be there, we can call that function module to execute the Smartform, there is no need to call the function modules like scripts
2) We have Se72 transaction code to create the Styles for SAPSCRIPT .
Regards
Sudheer
‎2007 Aug 01 3:54 PM
HI
after creating the smartform when we activate it a FM is generated .
we can find its name in environment tab of the menu items.
then in our report program we just call this fm.
for example:
report z71682_smartform.
tables vbrk.
data : lt_vbrk type standard table of vbrk,
lt_vbrp type standard table of vbrp,
lt_adrc type standard table of adrc,
lv_adrnr type kna1-adrnr,
wa_vbrk type vbrk,
wa_vbrp type vbrp,
wa_adrc type adrc.
data : var_fmname type rs38l_fnam.
select-options so_vbeln for vbrk-vbeln.
select vbeln
fkdat
kunrg
xblnr
waerk
from vbrk
into corresponding fields of table lt_vbrk
where vbeln in so_vbeln.
loop at lt_vbrk into wa_vbrk.
select single adrnr from kna1 into lv_adrnr where kunnr = wa_vbrk-kunrg.
select matnr
arktx
fkimg
vrkme
netwr
from vbrp
into corresponding fields of table lt_vbrp
where vbeln = wa_vbrk-vbeln.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'z71682_smartform3'
VARIANT = ' '
DIRECT_CALL = ' '
importing
fm_name = var_fmname
exceptions
no_form = 1
no_function_module = 2
others = 3
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function '/1BCDWB/SF00000156'
exporting
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
wa_vbrk = wa_vbrk
l_adrnr = lv_adrnr
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
tables
lt_vbrp = lt_vbrp
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
2. and for color in script you need to creat styles.
regards
vijay
<b>reward points if helpful</b>
‎2007 Aug 01 3:55 PM
HI,
1) We wont use any function moudles like open form start form.. to call a smartform because smartform it self when activated will generate a function module and the name of the funcation module that is generated can ge got from the menu path Environment -> Function module name..
But remember when dealing with smartforms always get the name of the function module for the smartform by using the function module. SSF_FUNCTION_MODULE_NAME pass the name of the smartform and it will return the name of the function moudle that is associated with this smartform
2) Tcode Se72
thanks,