Welcome To My BLOG

This site is to give a brief idea for the abap learners who are looking for some real time programs .It consists of collection of programs from my side . I hope these programs are very much used for all of the learners. Please check the links for any information in ABAP.
Please vote for my Blog. And please input me on this mail addrssess.Email me

Share this link with your friends

http://www.rebtel.com/u/15163104576

For every friend who signs up using this link and makes a payment, we'll give you 8 €!


Wednesday, September 22, 2010

Finding Relevant Smart form for SF Function Module

option 1:By using this sample program u can find out Smartform for a given Smartform Function Module.
option 2: If u know Smart form and u want to find out Function module of this SF then u can use FM
SSF_FUNCTION_MODULE_NAME
*&---------------------------------------------------------------------*

*& Report ZSMARTFORM *

*& *

*&---------------------------------------------------------------------*

*& *

*& *

*&---------------------------------------------------------------------*

report zsmartform no standard page heading .

*----------------------------------------------------------------------*

* T A B L E S D E C L A R A T I O N *

*----------------------------------------------------------------------*

tables :stxfadmi.

*----------------------------------------------------------------------*

* V A R I A B L E S D E C L A R A T I O N *

*----------------------------------------------------------------------*

data: l_formname like stxfadmi-formname.

*----------------------------------------------------------------------*

* S E L E C T I O N S C R E E N D E F I N I T I O N - B E G I N *

*----------------------------------------------------------------------*

selection-screen : begin of block po with frame title text-001.

parameters : p_fname like tfdir-funcname. " Function Module name

selection-screen : end of block po.

*----------------------------------------------------------------------*

* S E L E C T I O N S C R E E N D E F I N I T I O N - E N D *

*----------------------------------------------------------------------*

*----------------------------------------------------------------------*

* E V E N T S T A R T - O F - S E L E C T I O N *

*----------------------------------------------------------------------*

start-of-selection.

data: fnumber like stxfadmi-fmnumb.

fnumber = p_fname+10(8).

if p_fname+0(10) ne '/1BCDWB/SF'.

message e041(yw2) with 'This FM is not a Smartform generated FM'.

endif.

if fnumber is not initial.

select single formname into l_formname

from stxfadmi

where fmnumb le fnumber

and fmnumbd ge fnumber.

endif.

format color col_heading.

uline (65).

write:/ sy-vline,

(30) 'Func.Module Name' centered no-gap, sy-vline,

(30) 'SmartForm Name' centered no-gap, sy-vline.

uline /(65).

format reset.

write:/ sy-vline,

(30) p_fname centered no-gap, sy-vline,

(30) l_formname centered no-gap, sy-vline.

uline /(65).

No comments: