What are function modules used in alv,and its explanation
what are function modules used in alv,and its explanation
hi..
The important function modules are
Reuse_alv_fieldcatalog_merge
Reuse_alv_list_display
Reuse_alv_events_get
Reuse_alv_grid_display
Reuse_alv_commentary_write.
<b>REUSE_ALV_FIELDCATALOG_MERGE</b>
This function module is used to populate a field catalog which is essential to display the data in ALV.
If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter (I_structure_name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
Note : Fieldcatalog can be filled manually also by filling up all the required details into the internal table
The important parameters are:
1. Export:
a. I_program_name : report id
b. I_internal_tabname : the internal output table
c. I_inclname : include or the report name where all
the dynamic forms are handled.
2. Changing
ct_fieldcat : an internal table with the type
SLIS_T_FIELDCAT_ALV which is declared in the
type pool SLIS.
<b>REUSE_ALV_LIST_DISPLAY</b>
This is the function module which prints the data.
The important parameters are:
1. Export:
I_callback_program : report id
I_bypassing_buffer : X
I_buffer_active :
I_callback_pf_status_set : routine where a user can set
his own pf status or change the
functionality of the existing pf status.
I_callback_user_command : routine where the function codes are
handled.
I_structure name : name of the dictionary table
Is_Layout : structure to set the layout of the report
It_fieldcat : internal table with the list of all fields and their
attributes which are to be printed (this table
can be populated automatically by the function
REUSE_ALV_FIELDCATALOG_MERGE
It_events : internal table with a list of all possible events
of ALV and their corresponding form names.
2. Tables:
a. t_outtab : internal table with the data to be output
<b>REUSE_ALV_EVENTS_GET: </b>
Returns table of possible events for a a list type
1. Import:
Et_Events :
The event table is returned with all possible CALLBACK events for the specified list type (column NAME). For events to be processed by the Callback, their FORM field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field FORM filled and the entry modified using constants from the type pool SLIS.
2. Export:
I_list_type:
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchical-sequential list
REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
<b>REUSE_ALV_GRID_DISPLAY</b>
A new function from 4.6 version, to display the results in grid rather than a
preview.
Parameters : same as reuse_alv_list_display
<b>REUSE_ALV_COMMENTARY_WRITE</b>
This is used in the Top-of-page event to print the headings and other
comments for the list.
It_list_commentary : Internal table with the headings of the type
slis_t_listheader.
This internal table has three fields:
Typ : H - header, S - selection, A - action
Key : only when typ is S.
Info : the text to be printed
<b>plz reward pts if helpful.</b>
regards
vijay.
Similar Messages
-
How to find out what are the interfaces used for Job and Job Codes
HI All,
I just wanted to know how do we find out what are the interfaces used for Job and Job codes .
Thanks In Advance
SunnyHi,
Here is an idea for your request.
Basically you can create a simple query on multiprovider 0TCT_MC01.
Filter: you can use a variable for restriction of time ( calday, or calmonth) since you should be interested for a time period.
Choose following characters into your objects:
InfoProvider ( 0TCTIFPROV ) - you can create a variable for choosing infoprovider before query runs.
*Tp.[Type of BI Application Object] 0TCTBISOTYP = filter this with 'QUERY' or whatever your need is.
*BI Application Object 0TCTBISBOBJ, ( this will give you the name of the queries)
In key figures choose, Count for BI Appl. (0TCTWTCOUNT).
(number for query run)
Create a condition , for top 20.
Hope this helps.
Derya -
Which are function modules used to convert into XML format in SAP 4.6c Ver
which are function modules used to convert into XML format in SAP 4.6c Ver
Hi,
check this program , I think this will help you
TYPE-POOLS: ixml.
TYPES: BEGIN OF xml_line,
data(256) TYPE x,
END OF xml_line.
data : itab like catsdb occurs 100 with header line.
data : file_location type STRING.
data : file_name like sy-datum.
data : file_create type STRING.
file_name = sy-datum .
file_location = 'C:\xml\'.
concatenate file_location file_name into file_create.
concatenate file_create '.XML' into file_create.
DATA: l_xml_table TYPE TABLE OF xml_line,
l_xml_size TYPE i,
l_rc TYPE i.
select * from catsdb into table itab.
append itab .
CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
I_FILENAME =
I_APPL_KEEP = ' '
I_XML_DOC_NAME =
IMPORTING
PE_BIN_FILESIZE = l_xml_size
TABLES
i_tab_sap_data = itab
CHANGING
I_TAB_CONVERTED_DATA = l_xml_table
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 24
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 METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = file_create
filetype = 'BIN'
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
write : 'INTERNAL TABLE DATA IS SUCCESSFULLY DOWNLOADED TO LOCATION', file_create .
Thanks. -
What are different function modules used in alv?and their usage?
helo experts can u please explain what are the different function modules that are used in alv reports and what is the exact use of each and every function module?
Hi,
Well everybody gives good explanation to you.
The commonly used ALV functions used are;
1. REUSE_ALV_VARIANT_DEFAULT_GET
2. REUSE_ALV_VARIANT_F4
3. REUSE_ALV_VARIANT_EXISTENCE
4. REUSE_ALV_EVENTS_GET
5. REUSE_ALV_COMMENTARY_WRITE
6. REUSE_ALV_FIELDCATALOG_MERGE
7. REUSE_ALV_LIST_DISPLAY
8. REUSE_ALV_GRID_DISPLAY
9. REUSE_ALV_POPUP_TO_SELECT
Purpose of the above Functions are differ, not all the functions are required in all the ALV Report.
But either no.7 or No.8 is there in the Programs.
For further information, visit this link
http://www.abapcode.info/2007/06/alv-function-module.html
May this helps you.
Thanks.
Deepak Sharma -
What are functional modules? why we use them?
HI all,
Please explain what are the functional modules? why we use them? I am talking in reference to SAP HR.
Thanks,
RashmiHi SAP Gurus,
as now i got some idea that SAP has provided lot of funtional modules and also we can create our own function modules,
1, can any one tell with an example when and at what cases this funtional modules are made use of, and how will we come to know which funtional module has to be made use of and for which specific purposes.
2, do you mean to say SAP has provided many funtional modules but they are in Dormant stage untill activated or made use of.
3. Is developing funtional module mainly ABAPers work or could be done by Funtional person alltogether (in case of using the existing FMs
4, When and how this FMs work, what is the trigger point do we have to run this when required, if so how
5, what is the difference Between FMs and UserExits
Can anyone throw some light on this with an example,
Points for sure for Suitable answers
Thanks and Regards
Sathish
Edited by: sathish kumar on May 5, 2008 7:43 PM -
What is function module?wn we use it in "generic extractor"
hi friends
i dont know what is function module?wn we,and how we will creat it? whats tha use of it? send me notes with some real time examples
i will waiting for ur replaysWhat is FM extractor and when we are using :
Sometimes, if your application or requirement makes it necessary, you have to create your own function module to extract the data from whatever sap system to bw.
Therefore you normally make a copy of the standard fm 'RSAX_BIW_GET_DATA_SIMPLE'. To make this new function work for you, you have to realize the following.
Generic Extraction via Function Module
Generic Extraction via Function Module
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
http://help.sap.com/saphelp_nw04/helpdata/en/86/1c8c3e94243446e10000000a114084/frameset.htm -
Testing of function module using secatt ,st30 st03n
Hi Gurus ,
i am new to sap testing , kindly let me know the complete process of testing a function module using ecatt ,st30 and st03n s
kindly provide me with links for the same.
thanks in advance ,try this link for some information regarding eCatt tetsing using ST30.
Using ST30 to run ECATT
thanks
Venkat -
What are the function modules used in interactive ALV and parameters?
what are the function modules used in interactive ALV and parameters?
hi sunil
check these links,
About ALV:
http://www.geocities.com/mpioud/Abap_programs.html
ALV Group Heading
http://www.sap-img.com/fu037.htm
and few more,
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
also run the folowing code and see
check this sample code.you will be well versed with all the events of a interactive alv report.mark points if useful.
*& Report ZALV4_INTERACTIVE *
*& interactive alvs *
REPORT ZALV4_INTERACTIVE NO STANDARD PAGE HEADING
MESSAGE-ID ZMSG
LINE-COUNT 37(3)
LINE-SIZE 134.
TYPE-POOLS : SLIS.
TABLES DECLARATION ********************
TABLES : VBRK, " BILLING MASTERS TABLE
VBRP. " BILLING ITEM TABLE
TYPES DECLARATION ********************
TYPES : BEGIN OF TY_VBRK, " types for billing masters table
VBELN TYPE VBRK-VBELN, " billing document
WAERK TYPE VBRK-WAERK, " document currency
VKORG TYPE VBRK-VKORG, " sales organization
FKDAT TYPE VBRK-FKDAT, " billing date
BUKRS TYPE VBRK-BUKRS, " company code
BUTXT TYPE T001-BUTXT, " company name
NETWR TYPE VBRK-NETWR, " net currency value
LINE_COLOR(4) TYPE C,
END OF TY_VBRK.
TYPES : BEGIN OF TY_VBRP, " types for billing document item data
POSNR TYPE VBRP-POSNR, " billing item
FKIMG TYPE VBRP-FKIMG, " actual invoiced quantitty
VRKME TYPE VBRP-VRKME, " sales unit
NETWR TYPE VBRP-NETWR, " net currency value
MATNR TYPE VBRP-MATNR, " material number
ARKTX TYPE VBRP-ARKTX, " short text for sales order item
END OF TY_VBRP.
FIELD CATALOG ********************
DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
LAYOUT DECLARATION ********************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV.
EVENTS DECLARATION ********************
DATA : TY_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_EVENT.
PF STATUS ********************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
USER COMMAND ********************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
INTERNAL TABLES ********************
DATA : IT_VBRK TYPE TABLE OF TY_VBRK, "internal table for billing master
IT_VBRP TYPE TABLE OF TY_VBRP, "internal table for billing item
*internal table for field catalog
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
WORK AREA ********************
DATA : WA_VBRK LIKE LINE OF IT_VBRK, "work area for billing master
WA_VBRP LIKE LINE OF IT_VBRP. "work area for billing item
VARIABLE DECLARATION ********************
DATA : V_DATE TYPE SY-DATUM, " variable to store date values
V_VBELN TYPE VBRK-VBELN, " variable for billing document
V_FKDAT TYPE VBRK-FKDAT, " variable for billing date
V_FLAG(1). " variable for flag
SELECTION SCREEN ********************
SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN , " Billing document
S_FKDAT FOR VBRK-FKDAT, " Billing date
S_MATNR FOR VBRP-MATNR. " Material number
PARAMETERS : R1 RADIOBUTTON GROUP G1, "whole item details
R2 RADIOBUTTON GROUP G1. "selected item details
INITIALIZATION ********************
INITIALIZATION.
V_FLAG = 'X'.
V_DATE = SY-DATUM - 20.
S_FKDAT-SIGN = 'I'.
S_FKDAT-OPTION = 'EQ'.
S_FKDAT-LOW = V_DATE.
S_FKDAT-HIGH = SY-DATUM.
APPEND S_FKDAT.
SELECTION SCREEN VALIDATION ********************
AT SELECTION-SCREEN.
PERFORM CONVERSION. " performs data conversion for input
PERFORM VBELN_VALIDATE. " validating the billing document
PERFORM FKDAT_VALIDATE. " validating the billing date
START OF SELECTION ********************
START-OF-SELECTION.
SET TITLEBAR 'AAAA'.
PERFORM VBRK_POPULATE. " populating the billing master detais
PERFORM FIELDCATALOG. " designing the field catalog
PERFORM EVENTS. " performing the events for top of page
PERFORM DISP_BASICLIST." displaying the basic list
*& Form VBELN_VALIDATE
text validating the billing document
--> p1 text
<-- p2 text
FORM VBELN_VALIDATE .
IF S_VBELN IS INITIAL.
MESSAGE E000 WITH 'Make entries in all required fields'.
ELSE.
SELECT SINGLE VBELN
FROM VBRK
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH 'BILLING DOCUMENT DOESNT EXIST'.
ENDIF.
ENDIF.
ENDFORM. " VBELN_VALIDATE
*& Form FKDAT_VALIDATE
text validating the billing date
--> p1 text
<-- p2 text
FORM FKDAT_VALIDATE .
SELECT SINGLE FKDAT
FROM VBRK
INTO V_FKDAT
WHERE FKDAT IN S_FKDAT.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH 'BILLING DATE DOESNT EXIST'.
ENDIF.
ENDFORM. " FKDAT_VALIDATE
*& Form VBRK_POPULATE
text populating the billing master details
--> p1 text
<-- p2 text
FORM VBRK_POPULATE .
DATA : LD_COLOR(1) TYPE C.
LD_COLOR = 5.
SELECT VBRK~VBELN
VBRK~WAERK
VBRK~VKORG
VBRK~FKDAT
VBRK~BUKRS
VBRK~NETWR
T001~BUTXT
FROM VBRK INNER JOIN T001
ON VBRKBUKRS = T001BUKRS
INTO CORRESPONDING FIELDS OF TABLE IT_VBRK
WHERE VBRK~VBELN IN S_VBELN AND
VBRK~FKDAT IN S_FKDAT.
LOOP AT IT_VBRK INTO WA_VBRK.
LD_COLOR = LD_COLOR + 1.
IF LD_COLOR = 8.
LD_COLOR = 1.
ENDIF.
CONCATENATE 'C' LD_COLOR '10' INTO WA_VBRK-LINE_COLOR.
MODIFY IT_VBRK FROM WA_VBRK.
ENDLOOP.
ENDFORM. " VBRK_POPULATE
*& Form CONVERSION
text data conversion to take leading zeroes into account
--> p1 text
<-- p2 text
FORM CONVERSION .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = S_VBELN
IMPORTING
OUTPUT = S_VBELN.
ENDFORM. " CONVERSION
*& Form DISP_BASICLIST
text displaying the basic list
--> p1 text
<-- p2 text
FORM DISP_BASICLIST .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT =
IT_EVENTS = IT_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBRK
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISP_BASICLIST
*& Form FIELDCATALOG
text designing the field catalog
--> p1 text
<-- p2 text
FORM FIELDCATALOG .
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-SELTEXT_L = 'BILLING DOCUMENT'.
WA_FIELDCAT-COL_POS = 1.
WA_FIELDCAT-EMPHASIZE = 'C610'.
WA_FIELDCAT-KEY = 'X'.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'WAERK'.
WA_FIELDCAT-SELTEXT_L = 'DOCUMENT CURRENCY'.
WA_FIELDCAT-COL_POS = 2.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'VKORG'.
WA_FIELDCAT-SELTEXT_L = 'SALES ORGANIZATION'.
WA_FIELDCAT-EMPHASIZE = 'C610'.
WA_FIELDCAT-COL_POS = 3.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'FKDAT'.
WA_FIELDCAT-SELTEXT_L = 'BILLING DATE'.
WA_FIELDCAT-COL_POS = 4.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_L = 'COMPANY CODE'.
WA_FIELDCAT-COL_POS = 5.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'BUTXT'.
WA_FIELDCAT-SELTEXT_L = 'COMPANY NAME'.
WA_FIELDCAT-COL_POS = 6.
WA_FIELDCAT-OUTPUTLEN = 25.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBRK'.
WA_FIELDCAT-FIELDNAME = 'NETWR'.
WA_FIELDCAT-SELTEXT_L = 'NET CURRENCY VALUE'.
WA_FIELDCAT-COL_POS = 7.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
ENDFORM. " FIELDCATALOG
*& Form SET_PF_STATUS
text set the pf status
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'Z50658_PFSTATUS' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text set the user command
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'CLICK'.
IF R1 = 'X'.
IF NOT IT_VBRK IS INITIAL.
SELECT POSNR
FKIMG
VRKME
NETWR
MATNR
ARKTX
FROM VBRP
INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
FOR ALL ENTRIES IN IT_VBRK
WHERE VBELN = IT_VBRK-VBELN.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH ' NO BILLING DETAILS FOUND'.
ELSE.
IF V_FLAG = 'X'.
PERFORM DET_FIELDCATALOG.
V_FLAG = ''.
ENDIF.
PERFORM DET_LISTDISPLAY.
ENDIF.
ENDIF.
ENDIF.
IF R2 = 'X'.
READ TABLE IT_VBRK INTO WA_VBRK INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE POSNR
FKIMG
VRKME
NETWR
MATNR
ARKTX
FROM VBRP
INTO CORRESPONDING FIELDS OF WA_VBRP
WHERE VBELN = WA_VBRK-VBELN.
ENDIF.
APPEND WA_VBRP TO IT_VBRP.
ENDIF.
IF V_FLAG = 'X'.
PERFORM DET_FIELDCATALOG. "designing the field catalog for items
V_FLAG = ''.
ENDIF.
PERFORM DET_LISTDISPLAY. "displaying the secondary list
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'UP'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL'.
CALL TRANSACTION 'SE38'.
ENDCASE.
ENDFORM. "SET_USER_COMMAND
*& Form DET_FIELDCATALOG
text designing the field catalog for item details
--> p1 text
<-- p2 text
FORM DET_FIELDCATALOG .
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'POSNR'.
WA_FIELDCAT1-SELTEXT_L = 'BILLING ITEM'.
WA_FIELDCAT1-COL_POS = 1.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'FKIMG'.
WA_FIELDCAT1-SELTEXT_L = 'INVOICE QUANTITY'.
WA_FIELDCAT1-COL_POS = 2.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'VRKME'.
WA_FIELDCAT1-SELTEXT_L = 'SALES UNIT'.
WA_FIELDCAT1-COL_POS = 3.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'NETWR'.
WA_FIELDCAT1-SELTEXT_L = 'NET CURRENCY VALUE'.
WA_FIELDCAT1-COL_POS = 4.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'MATNR'.
WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUMBER'.
WA_FIELDCAT1-COL_POS = 5.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
WA_FIELDCAT1-FIELDNAME = 'ARKTX'.
WA_FIELDCAT1-SELTEXT_L = 'SALES ORDER ITEM'.
WA_FIELDCAT1-COL_POS = 6.
WA_FIELDCAT1-OUTPUTLEN = 20.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_LAYOUT1-ZEBRA = 'X'.
ENDFORM. " DET_FIELDCATALOG
*& Form DET_LISTDISPLAY
text displaying the secondary list
--> p1 text
<-- p2 text
FORM DET_LISTDISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT1
IT_FIELDCAT = IT_FIELDCAT1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = IT_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBRP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR IT_VBRP[].
ENDFORM. " DET_LISTDISPLAY
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR TY_EVENTS.
TY_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
TY_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND TY_EVENTS TO IT_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
SKIP.
ULINE.
WRITE :/2 ' DATE :', SY-DATUM,
45 'INTELLIGROUP ASIA PVT LTD',
110 'TIME :', SY-UZEIT.
WRITE : /3 'USER :', SY-UNAME,
45 'TITLE :', SY-TITLE,
110 'PAGE :', SY-PAGNO.
ULINE.
SKIP.
ENDFORM. "TOP_OF_PAGE
Cheers
navjot
Reward with points if it is helpful
Message was edited by:
navjot sharma -
What are the function modules used in CRM_ORDER_STATUS
Hi,
what are the function modules used in CRM_ORDER_STATUS(BADI) IN THIS METHOD AFTER_CHANGE...Hi,
http://scn.sap.com/thread/3202739
AFTER_CHANGE
ABAP ABAP Code
Follow-Up Action After Status Change
BEFORE_CHANGE
ABAP ABAP Code
Checks for Status Changeability
Sample code to set date on status change ------
INCLUDE crm_direct.
DATA : ls_status TYPE crmt_status_wrk.
DATA : lv_process_type TYPE crmt_process_type.
DATA : lit_appointment TYPE crmt_appointment_wrkt.
DATA : wa_appointment TYPE crmt_appointment_wrk.
DATA : ls_appoint TYPE crmt_appointment_com.
DATA : lt_appoint TYPE crmt_appointment_comt.
DATA : ls_input_field TYPE crmt_input_field.
DATA : lt_input_field TYPE crmt_input_field_tab.
DATA : ls_fieldnames TYPE crmt_input_field_names.
DATA : lt_fieldnames TYPE crmt_input_field_names_tab.
DATA : lt_exception TYPE crmt_exception_t.
DATA : lv_timestamp TYPE sc_tstfro.
DATA : lt_header_guid TYPE crmt_object_guid_tab.
DATA : lt_req_objects TYPE crmt_object_name_tab.
ls_status = is_status_wrk.
*Get process type
CALL FUNCTION 'CRM_INTLAY_GET_PROCESS_TYPE'
EXPORTING
iv_orderadm_h_guid = ls_status-guid
IMPORTING
ev_process_type = lv_process_type.
* Check process type
IF lv_process_type = 'ZZZ'.
INSERT ls_status-guid INTO TABLE lt_header_guid.
INSERT gc_object_name-appointment INTO TABLE lt_req_objects.
**Get appoinment data
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
iv_mode = gc_mode-display
it_requested_objects = lt_req_objects
IMPORTING
et_appointment = lit_appointment
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
IF sy-subrc NE 0.
EXIT.
ENDIF.
*read item level data
READ TABLE lit_appointment INTO wa_appointment WITH KEY ref_kind = 'B'.
IF sy-subrc = 0.
* *Time-stamp set to as per current date and time.
CONVERT DATE sy-datum TIME sy-uzeit INTO TIME STAMP lv_timestamp
TIME ZONE sy-zonlo.
*Fill appoinment structure
ls_appoint-ref_guid = wa_appointment-ref_guid."appoinment gid
ls_appoint-ref_kind = 'B'."Item
ls_appoint-ref_handle = '0000000000'.
ls_appoint-appt_type = 'ZSERV_CLOSE'."c_appt_type .
ls_appoint-timestamp_from = lv_timestamp.
ls_appoint-timezone_from = 'GMTUK'."time zone
ls_appoint-mode = ''.
ls_appoint-rule_name = 'TODAY'.
INSERT ls_appoint INTO TABLE lt_appoint.
ls_input_field-ref_guid = wa_appointment-ref_guid.
ls_input_field-ref_kind = 'B'.
ls_input_field-objectname = 'APPOINTMENT'.
ls_input_field-logical_key = 'ZSTATUS_NEW'.
*Fill input fields
ls_fieldnames-fieldname = 'TIMESTAMP_FROM'.
INSERT ls_fieldnames INTO TABLE ls_input_field-field_names.
INSERT ls_input_field INTO TABLE lt_input_field.
CLEAR lt_fieldnames[].CLEAR ls_fieldnames. CLEAR ls_input_field.
*To update date
CALL FUNCTION 'CRM_APPT_MAINTAIN_MULTI_OW'
EXPORTING
iv_ref_guid = wa_appointment-ref_guid
iv_ref_kind = 'B'
it_appointment_com = lt_appoint
CHANGING
ct_input_fields = lt_input_field
EXCEPTIONS
OTHERS = 1.
ENDIF.
ENDIF.
Standard BADI Order_Save will take care to save into database.
Regards,
Sumeet -
What are all Modules come under sales,service and marketing in Oracle CRM?
Hi All,
This is Hemanth writing in. I'm new to oracle CRM implementation in client side through Oracle Business Accelerator Methodology . I want to map sales ,service, marketing Modules.
Our client Company is manufacturing crane, tower crane,cutting bending machine.
what are all Modules come under sales, service and marketing ?
In Which module we can map the Trade management and logistics ?
Thanks in Advance
Hemanth.Chi prakesh,
firstly, cic winclient is an older version and obsolete so its better to implement the new crm version.
secondly, in any case if you want to implement, then your 3rd party raw data has to be mapped with the SAP system which could be a problem. Middleware could be a lot of effort. Rest all depends on how much customization you need for your business requirement in cic and sales. In case you are implementing standard functionality mostly then no major complications are expected otherwise lot of development effort may be required.
regards
shikha -
Hi all:
What are Function 'BDC_OPEN_GROUP' / 'BDC_INSERT' / 'BDC_CLOSE_GROUP' used for,when I write BDC code.
Thanksss.
qimingxingHi Firend,
BDC_OPEN_GROUP function module is used to create a new session.
Check this link for complete information on BDC_OPEN_GROUP:
http://help.sap.com/saphelp_40b/helpdata/en/fa/097126543b11d1898e0000e8322d00/content.htm
BDC_INSERT function module to add a transaction to a batch input session.
Check this link for BDC_INSERT:
http://help.sap.com/saphelp_sm32/helpdata/en/fa/097133543b11d1898e0000e8322d00/content.htm
BDC_CLOSE_GROUP function module is used to close a session after you have inserted all of your batch input data into it.
Check this link for BDC_CLOSE_GROUP:
http://help.sap.com/saphelp_40b/helpdata/en/fa/097140543b11d1898e0000e8322d00/content.htm
Hope this helps you.
Regards,
Chandra Sekhar -
What are the differences between ECC5.0 and 6.0 new GL functionality
Hi Experts,
What are the differences between ECC5.0 and 6.0 new GL functionality.
If we want to implement IFRS, I think New GL functionality is very helpful, but why sap is recommending only for ECC6.0 new GL functionality, Eventhough this functionality is available in ECC5.0.
Best Regards,
DharaniDear,
ECC 5.0 vs. ECC 6.0/SAP ERP 6.0
Functionality not available in the new G/L with mySAP ERP 2004 and ERP Central Component (ECC) 5.0:
Transfer prices
Statistical key figures
Euro translation
Audit Information System (AIS)
Archiving
Data retention tool
Regards,
Chintan Joshi. -
What are the classes used for bropdownListBox in BSP and purpose and how
what are the classes used for bropdownListBox in BSP and purpose and how
thank you,
Regards.
Jagrut BharatKumar ShuklaBenje001,
Right-click on the CWAI control on your form. Choose Properties. The first tab is the Channels tab. After you choose your device from the drop down box on the right, you can type in the Channels box which channel you want to use.
If you want to see a CWAI control that is already configured, all of the shipping examples will have this already done.
Also, if you have questions about any item on the CWAI (or any other NI ActiveX control) you can click the ? icon in the right corner of the properties page and then click on the item in the dialog that you need help with. This "What's this" help will describe that particular control on the dialog.
Hope that helps!
Regards,
Shannon R.
Applications Engineer
National Instruments -
Hi All,
What are the commands using in SAP ECC 6.0 ehp on SYBASE Database? Backup and restore commands?Hi Jayachander,
Have a look at these sap notes:
For taking backup: Schedule from DB13 and get the exact command from Logs
1841993 - SYB: How to schedule backups in DBA Cockpit
1887068 - SYB: Using external backup and restore with SAP Sybase ASE
How to restore DB
1611715 - SYB: How to restore a Sybase ASE database server (Windows)
Divyanshu -
What are variables or parameters in Apex and how to use them?
Hi
What are variables or parameters in apex and how to use them to connect and run BI Publisher Report
From Apex URLHello Kanaiya,
You should go here: http://www.oracle.com/technology/products/database/application_express/index.html
Look at "What is Oracle APEX?" then download the documentation and review the various PDF files that are available.
If you have a version of APEX installed and available, go through the 2-Day Application Express Developer's Guide followed by the Advanced Developer's Guide.
Good luck,
Don.
Maybe you are looking for
-
In my Ical i have multiple google calendars, from multiple accounts. I've got one calendar for my girlfriend (a Home account), so she can see my schedule and where i am. That brings a minor problem. In my Ical i have the same event now multiple times
-
Copy & Paste problem stops working
I've been experiencing an unusual issue with the copy and paste function on my MacBook Pro. The copy & paste function appears to work fine after I've restarted the computer, but after a short period (can be hours or days) the copy & paste function st
-
The import appears to be ready to go. After I click import it says some operations were not performed, and a list of the NEF files are listed. I cannot import anything.
-
Press CTRL ALT DELETE to log on
I have installed windows server on macbok pro and after restart, first time I am logging in but it asks to press CTRL ALT DELETE keys to log on. I have tried all possible key combinations on macbook but nothing working. I have found a solution on int
-
Applications Aren't Opening even though I bought Creative Cloud Membership
I purchased the student version of Creative Cloud on my macbook pro back in December of 2014, I guess I had downloaded trial versions of the applications, now when I open the applications it tells me my "Trial Has Expired" and to either License The