How to put CheckBox in TableColumn header?
How can I put a CheckBox in the TableColumn header?
I made a CheckBox Column with a custom CellValueFactory and want to select/deselect all rows with one "master" checkbox in the column header.
Related thread:
custom table header "Thread: custom table header"
http://javafx-jira.kenai.com/browse/RT-14909 "It should be possible to customise the TableColumn header area more" (fixed in 2.2)
Short answer is to use setGraphic on the column.
TableColumn col = new TableColumn("Pink Elephants");
col.setGraphic(new CheckBox());
Similar Messages
-
How to put checkbox into sap grid display
hi,
how to put checkbox into sap grid display ,when i am selecting the check box it should move to second secondary list.
could u plz explain clearlyHi,
In the layout fill
is_layout-box_fieldname = 'CHECKBOX'
is_layout-box_tabname = 'I_OUTPUT'.
The internal table that you are passing as I_OUTPUT, should have an extra field called CHECKBOX of length 1.
Also refer to tutorial Easy Grid :
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf
Cheers,
Simha. -
Hi Experts, oo hierarchical alv, how to add checkbox on every header?
Hi Experts,
I am working on oo hierarchical alv, how can I add checkbox on every header? thanks in advance!
Kind regards
DawsonHi Dawson,
Just refer the below program & pass the check box functionality (mentioned in bold) in REUSE_ALV_HIERSEQ_LIST_DISPLAY in your program.
TYPE-POOLS : slis.
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
CALL BACK FORM
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
LOOP AT itab.
itab-flag = 'X'.
MODIFY itab.
ENDLOOP.
IMPORTANT.
WHATROW-REFRESH = 'X'.
ENDFORM. "ITAB_user_command
Regards
Abhii... -
How to put checkboxes in a Tree list
Hi All,
I have generated a tree structure in my list from a table. The requirement is I have to put checkboxes for the leaves(bottom most level) of the tree. Now the user will be selecting required leaves and thus my logic will continue.
Can anyone tell me how can i put checkboxes for all the leaves?
Also, The number of leaves is in thousands. To keep that many check boxes, I have to create that many number of variables, which can be done dynamically.
So, how to put check boxes and how to create those variables dynamically? How can i meet my requirement?
Plz guide me in this issue.Take a look SAPCOLUMN_TREE_CONTROL_DEMO program screen 100 in SE80 transaction
ibrahim -
How to put checkbox into classical report header row?
Hi,
I have a classical report that has a check item as a first column. I would like to put a check box item into the header row too, When checked it is supposed to set the check box item in all report rows. Something like in APEX Shared components / Links / Grid Edit.
Is this possible to do? TIA.
TamasHi,
See e.g. this post
Re: Tabular form check all checkbox header
Regards,
Jari -
How to put the value in Header test while creating the sales order
Hi ,
I am creating the Sales order using the Idoc Orders05 .
I have to pass the value in the header text 1. the value is a transaction id which is a string value.
If anyone has an idea how to do this using the the Orders Idoc. it would be a great help
Thanks
NikhilIf you have access to idoc before calling the processing Function module, Adding header text segments E1EDKT1 and E1EDKT2 to the idoc will create the header text.
Regards
Sridhar -
ALV Tree - how to put checkbox on the node level?
Hello everyone!
I have an AlvTree and I have special column named SEL. That column contains checkboxes. I want to put additional checkboxes at the node level, I need them to create select all option.
In other words I must somehow create something similar to do_sum option. DO_SUM works for numeric columns, the sum of all rows in current node appears at the top level. So I must do the same but checkbox.
Are there any ideas?
Here is my code of creating the tree.
DATA: g_tree9001 type ref to cl_gui_alv_tree_simple.
" Here I fill fieldcat...
create object g_tree9001
EXPORTING
i_parent = g_doc_cont
i_node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
i_item_selection = 'X'
i_no_html_header = 'X'
i_no_toolbar = ''.
call method g_tree9001->set_table_for_first_display
EXPORTING
i_save = 'A'
is_variant = ls_variant
CHANGING
it_sort = gt_sort9001
it_outtab = gt_tree9001
it_fieldcatalog = gt_treefcat9001.
My output table gt_tree9001 has sthe following structure:
BUKRS, KTEXT, SEL, SWERK.
My sort table gt_sort9001 has 2 rows. Sorting by BUKRS and KTEXT.
My tree looks like this:
BUKRS/KTEXT --- SEL --- SWERK
+bukrs1 ------------------------------
-- ktext1 --- X --- swerk1
-- ktext2 --- X --- swerk2
+bukrs2 ------------------------------
-- ktext3 --- X --- swerk3
I want to get:
BUKRS/KTEXT --- SEL --- SWERK
+bukrs1 ----------X----------------
-- ktext1 --- X --- swerk1
-- ktext2 --- X --- swerk2
+bukrs2 ----------X----------------
-- ktext3 --- X --- swerk3
Appreciate any help!Hi ,
Check the below threads, it may give some idea to get check box in the node .
[LINK1|Check box on left navigation of ALV tree;
[LINK2|Checkbox ALV Tree CL_GUI_ALV_TREE;
Regards,
Saravana.S -
How to get and put data in HTTP header in Client Side
One JSP's function is to display data records page by page. Client users could click "First page" or "Previous Page" or "Next Page" or "Last Page" button to let the JSP to show the corresponding page. So the JSP must remember the current page number. Due to there are a number of client users maybe access the JSP at the same time, keep the current page number in session, there will be a lot of session is created at the same time, this will impact system's performance. So using session to keep data method is not used. I plan to use request header and response header to pass the current page number. I know use the response.addHeader to put data in response header and also know use request.getHeader to get data in request header in server side, but I donot know how to put data in request header and how to get data in response header in client side. Could you please give me a help? If donot use these method, are there any other method? Thanks a lot.
Why not pass it as a parameter with the URL?
at the beginning of the page..
<%
int pageNumber = Integer.parseInt(request.getParameter("page"));
%>
then when defining your links
<a href="thisPage.jsp?page=<%= (pageNumber-1)%>">Previous</a>
<a href="thisPage.jsp?page=<%= (pageNumber+1)%>">Next</a> -
Putting checkboxes in smartform?
hai,
can anybody plz tell me how to put checkboxes and radio button's in smartform??hi nani
under text node you l see 4 tabs,in that click on general attributes tab and under that left side you will see two small buttons put your cursor there one is check and the other is editor, click on editor it will take you to another screen there in the menu bar(the top most title ) click on goto and in that go with change editor.
hope this is clear
Regards
Zarina -
How to put a checkbox in a smartform ?
Hi all,
I have a requirement where i need a checkbox inside the smartform and this checkbox needs to be checked according to the data populated in the form.
( like: if value is populated in a variable the checkbox needs to be checked else if the variable is initial then the checkbox shouldn't be checked).
Can anybody suggest a solution to this.
Thanks in advance.
SmithaHi
Welcome to SDN
Solution 1:
You can print a check box in different ways.. by inserting symbols and making window as check box..
once go through the thread u will get to k now differnt ways
putting checkboxes in smartform?
Re: Quick Question on Smartforms
Solution 2:
To use Check box in smartform do the following:
Change the editor to 'PC Editor' and take the menu.
in text editor of TEXT ELEMENTS..
Insert -> Characters -> SAP Symbols
in print preview u can't see these changes..
go through these links,hope help you to solve your problem
Re: How to create checkbox in smartforms??
Re: Regarding usage of checkbox in smartforms
Refer to link How to create checkbox in smartforms??
<b>Reward points for useful Answers</b>
Regards
Anji -
Hi how to put check box in REUSE_ALV_HIERSEQ_LIST_DISPLAY
hi i have a header table
ITAB_HEADER :
LFSNR
FIELD2
FIELD3
FIELD4
i need to put a checkbox on the header record please advise what step to do and where to put that checkbox i read some example but i don't understand how it is done please urgent help neededyou do one thing as i tried
include an extra field in your header table
but remember one thing instead of adding it to field catalog give it in layout as
WA_LAYOUT-box_fieldname = 'W_CHK'.
wa_layout-box_tabname = 'IT_HEADER'.
now attach this layout to your FM.
YOUR PROBLEM WILL B SOLVED
award if useful
KEEP ROCKIN
vivek -
How to put a few pages together as a panel group in the same screen ?
Dear Friends,
Hello. I am developing the accounting application of Journal Entry module. I have developed 5 pages for a journal entry: Journal header, Journal Line, Journal total, Journal Error and Journal Approval. I want to put 5 pages together as a panel group in the same screen so that users are convenient to use them. The format is as follows:
Header | Lines | Total | Error | Approval
When a user click on Header or Lines or Total or Error or Approval, its related page is displayed below it on the screen. But I don't understand how to put "Header", "Lines", "Total", "Error" and "Approval" together as above format and link them to its related page. Can anybody tell me how to do that ? Thanks.
LucyMike,
It's correct to make 5 pages as a seperate component.
I am developing an accounting system using PeopleTools by myself.
Because you understand PeopleSoft financial application, please tell me the 2 questions as follows:
First, In Journal Line page, when select "edit Journal" and click button "process", the system check the Journal against Budget, if it's Ok, the System assign Journal ID for the Journal and put "valid" into the field of "Budget Status" and "Journal Status" in Total page. If it's not OK, the system send error message into Error page. Do you know how developer do that ?
Second, In Journal Line Page, when select "Submit Journal" and click button "process", the system send the Journal to Approval page for approval. Do you know how developer do that ?
Lucy -
. How to put Check box in every row in Table
Hi Friends,
I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
Here Select Check Box of particular row then click GetData button. That row data will be displayed in one popup window.
In table suppose 6 rows available in table. Every Row first Check box available.
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
How to put Check box in every row in Table? can you send any examples applications
Regards
VijayHi Friend,
When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
attribute.
So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
Okay...here i am getting one problem. i have got Check boxes .But i am select check box in first row. that time all check boxes will be selected.
i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
i need this can u help me....
Regards
Vijay -
How can i bring the column heading downloaded in excel sheet?
hi all,
I am using FM SAP_CONVERT_TO_XLS_FORMAT to downloading populated internal table data into excel sheet by using filename type rlgrap-filename.
Now I need the column heading(field name) for downloaded data in excel sheet.
pls tell me how can i merge the col heading with data perfectly. Is there any FM fulfills this requirement.
pls give me a suitable approch.
Thanks
PRRHI,
Go thru this code.
REPORT ZRMM0056 NO STANDARD PAGE HEADING
MESSAGE-ID ZZ
LINE-SIZE 300
LINE-COUNT 65.
Program : ZRMM0056
Title : Non Inventory PO's
Description : Non Inventory Purchase Orders details with
Vendor and Invoice Receipts and Goods Receipts.
Input :
Select-options : 1. G/L Account No
Parameters : 1.File Paths for the Excel sheet
Others (Specify):
Output : Extract Files in the application server
Report :
Hear Ticket # : 113392
Created by : Srinivas Rao.M
Created on : 12/15/2005
Version : 1
Request : D10K944304
Transaction Code : Z420
Change History *
Date Programmer Search String Description *
12/19/2005 Srinivas D10K944316 Removed Purchasing document
Company code and Plant from
Select-Options and Inculded
G/L Account No and changed
code accordingly.
T A B L E S *
TABLES: EKBE, " History of Purchasing Document
EKPO, " Purchasing Document Item
EKKO, " Purchasing Document Header
LFA1, " Vendor master (general section)
EKKN. " Account Assignment in Purchasing Doc
INTERNAL TABLES
*--Internal table to store Purchasing document header data
DATA : BEGIN OF IT_POHEADER OCCURS 0,
EBELN LIKE EKKO-EBELN, "Purchasing document
AEDAT LIKE EKKO-AEDAT, "Created on
ERNAM LIKE EKKO-ERNAM, "Created by
LIFNR LIKE EKKO-LIFNR, "Vendor
END OF IT_POHEADER.
*--Internal table to store Purchasing document Item data
DATA : BEGIN OF IT_POITEM OCCURS 0,
EBELN LIKE EKPO-EBELN, "Purchasing document
EBELP LIKE EKPO-EBELP, "Item Number
MATNR LIKE EKPO-MATNR, "Material number
BUKRS LIKE EKPO-BUKRS, "Company code
WERKS LIKE EKPO-WERKS, "Plant
MATKL LIKE EKPO-MATKL, "Material Group
MENGE LIKE EKPO-MENGE, "Order Quantity
NETPR LIKE EKPO-NETPR, "Net Price
PEINH LIKE EKPO-PEINH, "Price unit
NETWR LIKE EKPO-NETWR, "Net Value
END OF IT_POITEM.
*--Internal table to hold final display data.
DATA : BEGIN OF IT_FINAL OCCURS 0,
EBELN LIKE EKKO-EBELN, "Purchasing document
EBELP LIKE EKPO-EBELP, "Item Number
AEDAT LIKE EKKO-AEDAT, "Created on
ERNAM LIKE EKKO-ERNAM, "Created by
MATNR LIKE EKPO-MATNR, "Material number
BUKRS LIKE EKPO-BUKRS, "Company code
WERKS LIKE EKPO-WERKS, "Plant
MATKL LIKE EKPO-MATKL, "Material Group
MENGE LIKE EKPO-MENGE, "Order Quantity
NETPR LIKE EKPO-NETPR, "Net Price
PEINH LIKE EKPO-PEINH, "Price unit
NETWR LIKE EKPO-NETWR, "Net Value
LIFNR LIKE EKKO-LIFNR, "Vendor
NAME1 LIKE LFA1-NAME1, "Vendor Name
GSBER LIKE EKKN-GSBER, "Business area
*--IR details
IR_BELNR LIKE EKBE-BELNR, "IR-Number of Material Document
IR_BUZEI LIKE EKBE-BUZEI, "IR-Item in material Document
IR_BUDAT LIKE EKBE-BUDAT, "IR-Posting date
IR_MENGE LIKE EKBE-MENGE, "IR-Quantity
*--GR details
GR_BELNR LIKE EKBE-BELNR, "GR-Number of Material Document
GR_BUZEI LIKE EKBE-BUZEI, "GR-Item in material Document
GR_BUDAT LIKE EKBE-BUDAT, "GR-Posting date
GR_MENGE LIKE EKBE-MENGE, "GR-Quantity
END OF IT_FINAL.
*--Internal table to store History per Purchasing Document data
DATA : BEGIN OF IT_HISTORY OCCURS 0,
EBELN LIKE EKBE-EBELN, "Purchasing document
EBELP LIKE EKBE-EBELP, "Item
VGABE LIKE EKBE-VGABE, "Trans/Event type
BELNR LIKE EKBE-BELNR, "Number of Material Document
BUZEI LIKE EKBE-BUZEI, "Item in material Document
BUDAT LIKE EKBE-BUDAT, "Posting date
MENGE LIKE EKBE-MENGE, "Quantity
BEWTP LIKE EKBE-BEWTP, "Posting history category
END OF IT_HISTORY.
*--Internal table to store vendor name.
DATA : BEGIN OF IT_VENDOR OCCURS 0,
LIFNR LIKE LFA1-LIFNR, "Vendor Number
NAME1 LIKE LFA1-NAME1, "Vendor Name
END OF IT_VENDOR.
*--Internal table to store Business area for Purchasing document
DATA : BEGIN OF IT_BUSINESS OCCURS 0,
EBELN LIKE EKKN-EBELN, "Purchasing document
EBELP LIKE EKKN-EBELP, "Purchasing Item
SAKTO LIKE EKKN-SAKTO, "G/L Account No
GSBER LIKE EKKN-GSBER, "Business area
END OF IT_BUSINESS.
DATA : BEGIN OF FIELDNAMES OCCURS 0,
TEXT(40),
END OF FIELDNAMES.
VARIABLES DECLARATION *
DATA: V_FILE LIKE IBIPPARMS-PATH, "File path
V_FLD LIKE DYNPREAD-FIELDNAME, "Dynpread fieldname
V_FLAG(1) VALUE SPACE. "FLAG VARIABLE
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK S1 WITH FRAME TITLE TEXT-001.
*--Begin of change D10K944316
SELECT-OPTIONS : S_SAKTO FOR EKKN-SAKTO. "G/L Accoun no.
*--End of change D10K944316
SELECTION-SCREEN END OF BLOCK S1.
SELECTION-SCREEN BEGIN OF BLOCK S2 WITH FRAME TITLE TEXT-002.
PARAMETERS : P_EXCEL AS CHECKBOX DEFAULT ' ' . " download to excel
PARAMETERS : C_FILE(128) DEFAULT : 'C:\ZRMM0056.xls'.
SELECTION-SCREEN END OF BLOCK S2.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR C_FILE.
*-Form to get file path for download of data
PERFORM GET_FILE_PATH.
AT SELECTION-SCREEN.
PERFORM SCREEN_VALIDATIONS.
START-OF-SELECTION
START-OF-SELECTION.
*--Extract Purchasing document header data.
PERFORM GET_PO_HEADER_DATA.
*--Extract Purchasing document Item data.
IF NOT IT_BUSINESS[] IS INITIAL.
PERFORM GET_PO_ITEM_DATA.
*--Get complete required data in final internal table
PERFORM GET_FINAL_DATA.
ENDIF.
END-OF-SELECTION
END-OF-SELECTION.
IF V_FLAG IS INITIAL.
*--Display Purchasing document details
IF NOT IT_FINAL[] IS INITIAL.
PERFORM DISPLAY_PODATA.
IF P_EXCEL = 'X'.
*--To down load data to excel sheet
PERFORM DOWN_LOAD_TO_EXCEL.
ENDIF.
ENDIF.
ELSE.
MESSAGE I001(ZZ) WITH 'No data found'(003).
ENDIF.
TOP-OF-PAGE
TOP-OF-PAGE.
*--To display page header
PERFORM PAGE_HEADER.
*& Form GET_PO_HEADER_DATA
To Get Purchasing header data
FORM GET_PO_HEADER_DATA .
*--To extract Business Area details
CLEAR IT_BUSINESS.
REFRESH IT_BUSINESS.
SELECT EBELN "Purchasing document
EBELP "Purchasing document item
SAKTO "G/L Account no
GSBER "Business area
FROM EKKN
INTO TABLE IT_BUSINESS
WHERE SAKTO IN S_SAKTO.
IF SY-SUBRC <> 0.
V_FLAG = 'X'.
MESSAGE I001(ZZ) WITH
'No data selected for the given selection criteria'(004).
STOP.
ELSE.
*--To extract Purchasing document details with respect
to G/L Account no
CLEAR IT_POHEADER.
REFRESH IT_POHEADER.
SELECT EBELN "Purchasing document
AEDAT "Created on
ERNAM "Created by
LIFNR "Vendor
FROM EKKO
INTO TABLE IT_POHEADER
FOR ALL ENTRIES IN IT_BUSINESS
WHERE EBELN = IT_BUSINESS-EBELN.
IF NOT IT_POHEADER[] IS INITIAL.
CLEAR IT_VENDOR.
REFRESH IT_VENDOR.
*--Extracting Vendor details
SELECT LIFNR "Vendor #
NAME1 "Name
FROM LFA1
INTO TABLE IT_VENDOR
FOR ALL ENTRIES IN IT_POHEADER
WHERE LIFNR = IT_POHEADER-LIFNR.
ENDIF.
ENDIF.
ENDFORM. " GET_PO_HEADER_DATA
*& Form GET_PO_ITEM_DATA
To extract Purchasing document item data
FORM GET_PO_ITEM_DATA .
CLEAR IT_POITEM.
REFRESH IT_POITEM.
SELECT EBELN "Purchasing document
EBELP "Item Number
MATNR "Material number
BUKRS "Company code
WERKS "Plant
MATKL "Material Group
MENGE "Order Quantity
NETPR "Net Price
PEINH "Price unit
NETWR "Net Value
FROM EKPO
INTO TABLE IT_POITEM
FOR ALL ENTRIES IN IT_BUSINESS
WHERE EBELN = IT_BUSINESS-EBELN
AND EBELP = IT_BUSINESS-EBELP.
IF NOT IT_POITEM[] IS INITIAL.
CLEAR IT_HISTORY.
REFRESH IT_HISTORY.
SELECT EBELN "Purchasing document
EBELP "Item
VGABE "Trans/Event type
BELNR "Number of Material Document
BUZEI "Item in material Document
BUDAT "Posting date
MENGE "Quantity
BEWTP "Posting history category
FROM EKBE
INTO TABLE IT_HISTORY
FOR ALL ENTRIES IN IT_POITEM
WHERE EBELN = IT_POITEM-EBELN
AND EBELP = IT_POITEM-EBELP
AND ( VGABE = '1' OR VGABE = '2' ) "1 = GR , 2 = IR
AND ( BEWTP = 'Q' OR BEWTP = 'E' ). "Q = GR , R = IR
IF SY-SUBRC = 0.
SORT IT_HISTORY BY EBELN EBELP.
ENDIF.
ENDIF.
ENDFORM. " GET_PO_ITEM_DATA
*& Form GET_FILE_PATH
Select file path
FORM GET_FILE_PATH .
CLEAR V_FILE.
MOVE 'p_flname' TO V_FLD.
MOVE C_FILE TO V_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = V_FLD
IMPORTING
FILE_NAME = V_FILE
EXCEPTIONS
OTHERS = 1.
MOVE V_FILE TO C_FILE.
ENDFORM. " GET_FILE_PATH
*& Form PAGE_HEADER
To Print page header and other details
FORM PAGE_HEADER .
*--Page Header
ULINE AT /1(300).
FORMAT COLOR 1.
WRITE:/ 'Run Date:'(005), SY-DATUM, 45 'Stanley Works'(006),
100 'Page No:'(007), SY-PAGNO LEFT-JUSTIFIED, 298 ''.
WRITE:/ 'Run Time:'(008), SY-UZEIT, 43 SY-TITLE, 100 SY-UNAME, 298 ''.
WRITE:/ 'Source :'(009), SY-SYSID, 100 SY-CPROG, 298 ''.
FORMAT COLOR OFF.
ULINE AT /1(300).
FORMAT COLOR 4.
WRITE : / SY-VLINE , (10) 'Purchasing Doc'(010),
SY-VLINE, (5) 'Item'(011),
SY-VLINE, (10) 'Created On'(012),
SY-VLINE, (7) 'Crea By'(013),
SY-VLINE, (10) 'Material'(014),
SY-VLINE, (6) 'Com cd'(015),
SY-VLINE, (5) 'Plant'(016),
SY-VLINE, (10) 'Mat Group'(017),
SY-VLINE, (13) 'Order Qty'(018),
SY-VLINE, (11) 'Net Price'(019),
SY-VLINE, (10) 'Price Unit'(020),
SY-VLINE, (13) 'Net Value'(021),
SY-VLINE, (8) 'Bus Area'(022),
SY-VLINE, (10) 'Vendor'(023),
SY-VLINE, (28) 'Vendor Name'(024),
*--IR details
SY-VLINE, (10) 'IR-Mat Doc'(025),
SY-VLINE, (5) 'IR-It'(026),
SY-VLINE, (9) 'IR-Post dt'(027),
SY-VLINE, (13) 'IR-Quantity'(028),
*--GR details
SY-VLINE, (10) 'GR-Mat Doc'(029),
SY-VLINE, (5) 'GR-It'(030),
SY-VLINE, (9) 'GR-Post dt'(031),
SY-VLINE, (13) 'GR-Quantity'(032), SY-VLINE.
FORMAT COLOR OFF.
ULINE AT /1(300).
ENDFORM. " PAGE_HEADER
*& Form SCREEN_VALIDATIONS
Selection screen validations
FORM SCREEN_VALIDATIONS .
*--Validation for G/L Account No
IF NOT S_SAKTO IS INITIAL.
SELECT SAKNR UP TO 1 ROWS
INTO EKKN-SAKTO
FROM SKA1 WHERE
SAKNR IN S_SAKTO.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E001(ZZ) with 'Please enter a valid G/L Account no'(048).
ENDIF.
ENDIF.
*--Validation for Excel file path
IF P_EXCEL = 'X'.
IF C_FILE = ' '.
MESSAGE E001(ZZ) with 'Please enter a valid Excle Path'(035).
ENDIF.
ENDIF.
ENDFORM. " SCREEN_VALIDATIONS
*& Form DISPLAY_PODATA
To Display Purchasing Document details
FORM DISPLAY_PODATA .
FORMAT COLOR 2.
SORT IT_FINAL BY EBELN EBELP AEDAT BUKRS WERKS.
LOOP AT IT_FINAL.
WRITE : / SY-VLINE ,(10) IT_FINAL-EBELN, "Purchasing Doc
SY-VLINE, (5) IT_FINAL-EBELP, "Item
SY-VLINE, (10) IT_FINAL-AEDAT, "Created On
SY-VLINE, (7) IT_FINAL-ERNAM, "Created By
SY-VLINE, (10) IT_FINAL-MATNR, "Material
SY-VLINE, (6) IT_FINAL-BUKRS, "Company code
SY-VLINE, (5) IT_FINAL-WERKS, "Plant
SY-VLINE, (10) IT_FINAL-MATKL, "Material Group
SY-VLINE, (13) IT_FINAL-MENGE, "#EC UOM_IN_MES
"Order Qty
SY-VLINE, (11) IT_FINAL-NETPR, "#EC UOM_IN_MES
"Net Price
SY-VLINE, (10) IT_FINAL-PEINH, "#EC UOM_IN_MES
"Price Unit
SY-VLINE, (13) IT_FINAL-NETWR, "#EC UOM_IN_MES
"Net Value
SY-VLINE, (8) IT_FINAL-GSBER, "Bus Area
SY-VLINE, (10) IT_FINAL-LIFNR, "Vendor
SY-VLINE, (28) IT_FINAL-NAME1, "Vendor name
*--IR details
SY-VLINE, (10) IT_FINAL-IR_BELNR, "IR-Mat Doc
SY-VLINE, (5) IT_FINAL-IR_BUZEI, "IR-It
SY-VLINE, (9) IT_FINAL-IR_BUDAT, "IR-Post dt
SY-VLINE, (13) IT_FINAL-IR_MENGE, "#EC UOM_IN_MES
"IR-Quantity
*--GR details
SY-VLINE, (10) IT_FINAL-GR_BELNR, "GR-Mat Doc
SY-VLINE, (5) IT_FINAL-GR_BUZEI, "GR-It
SY-VLINE, (9) IT_FINAL-GR_BUDAT, "GR-Post dt
SY-VLINE, (13) IT_FINAL-GR_MENGE, SY-VLINE.
"#EC UOM_IN_MES
"GR-Quantity
ENDLOOP.
FORMAT COLOR OFF.
ENDFORM. " DISPLAY_PODATA
*& Form DOWN_LOAD_TO_EXCEL
text
FORM DOWN_LOAD_TO_EXCEL .
<b>REFRESH FIELDNAMES.
FIELDNAMES-TEXT = TEXT-010.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-011.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-012.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'Created By'(036).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-014.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'Company Code'(037).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-016.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'Material Group'(038).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'Order Quantity'(039).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-019.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-020.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-021.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'Business Area'(040).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-023.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-024.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'IR Material Doc'(041).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'IR Item'(042).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'IR Posting Date'(043).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-028.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'GR Material Doc'(044).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'GR Item'(045).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = 'GR Posting Date'(046).
APPEND FIELDNAMES.CLEAR FIELDNAMES.
FIELDNAMES-TEXT = TEXT-032.
APPEND FIELDNAMES.CLEAR FIELDNAMES.
*--FM to download data to Excel sheet
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = C_FILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = IT_FINAL
FIELDNAMES = FIELDNAMES
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE E001(ZZ) WITH 'Data could not downloaded'(047).
ENDIF.</b>ENDFORM. " DOWN_LOAD_TO_EXCEL
*& Form GET_FINAL_DATA
To Populate required data in final internal table
FORM GET_FINAL_DATA .
CLEAR IT_FINAL.
REFRESH IT_FINAL.
LOOP AT IT_POITEM.
CLEAR IT_POHEADER.
READ TABLE IT_POHEADER WITH KEY EBELN = IT_POITEM-EBELN.
IF SY-SUBRC = 0.
MOVE : IT_POHEADER-EBELN TO IT_FINAL-EBELN, "Purchasing Doc
IT_POITEM-EBELP TO IT_FINAL-EBELP, "Item
IT_POHEADER-AEDAT TO IT_FINAL-AEDAT, "Created On
IT_POHEADER-ERNAM TO IT_FINAL-ERNAM, "Created By
IT_POITEM-MATNR TO IT_FINAL-MATNR, "Material
IT_POITEM-BUKRS TO IT_FINAL-BUKRS, "Company code
IT_POITEM-WERKS TO IT_FINAL-WERKS, "Plant
IT_POITEM-MATKL TO IT_FINAL-MATKL, "Material Group
IT_POITEM-MENGE TO IT_FINAL-MENGE, "Order Qty
IT_POITEM-NETPR TO IT_FINAL-NETPR, "Net Price
IT_POITEM-PEINH TO IT_FINAL-PEINH, "Price Unit
IT_POITEM-NETWR TO IT_FINAL-NETWR, "Net Value
IT_POHEADER-LIFNR TO IT_FINAL-LIFNR. "Vendor
*--To Insert IR details
CLEAR IT_HISTORY.
READ TABLE IT_HISTORY WITH KEY EBELN = IT_POITEM-EBELN
EBELP = IT_POITEM-EBELP
VGABE = '2'
BEWTP = 'Q'.
IF SY-SUBRC = 0.
MOVE :
IT_HISTORY-BELNR TO IT_FINAL-IR_BELNR, "IR-Number of Mat Doc
IT_HISTORY-BUZEI TO IT_FINAL-IR_BUZEI, "IR-Item in mat Doc
IT_HISTORY-BUDAT TO IT_FINAL-IR_BUDAT, "IR-Posting date
IT_HISTORY-BUDAT TO IT_FINAL-IR_MENGE. "IR-Quantity
ENDIF.
*--To insert GR details
CLEAR IT_HISTORY.
READ TABLE IT_HISTORY WITH KEY EBELN = IT_POITEM-EBELN
EBELP = IT_POITEM-EBELP
VGABE = '1'
BEWTP = 'E'.
IF SY-SUBRC = 0.
MOVE :
IT_HISTORY-BELNR TO IT_FINAL-GR_BELNR, "IR-Number of Mat Doc
IT_HISTORY-BUZEI TO IT_FINAL-GR_BUZEI, "IR-Item in mat Doc
IT_HISTORY-BUDAT TO IT_FINAL-GR_BUDAT, "IR-Posting date
IT_HISTORY-BUDAT TO IT_FINAL-GR_MENGE. "IR-Quantity
ENDIF.
*--To insert Vendor details
CLEAR IT_VENDOR.
READ TABLE IT_VENDOR WITH KEY LIFNR = IT_POHEADER-LIFNR.
IF SY-SUBRC = 0.
MOVE : IT_VENDOR-NAME1 TO IT_FINAL-NAME1.
ENDIF.
*--To insert Business area
CLEAR IT_BUSINESS.
READ TABLE IT_BUSINESS WITH KEY EBELN = IT_POITEM-EBELN
EBELP = IT_POITEM-EBELP.
IF SY-SUBRC = 0.
MOVE : IT_BUSINESS-GSBER TO IT_FINAL-GSBER.
ENDIF.
APPEND IT_FINAL.
CLEAR IT_FINAL.
ENDIF.
ENDLOOP.
ENDFORM. " GET_FINAL_DATA
thanks
Sunil -
How to put Check Boxes and Radio button in Smartforms
Hi all,
How to put check Box and radio button in Smartforms ............ from web properties there is an option to use. But How to use.
regards,
Mohsinu can declare the checkboxes or radiobuttons whatever in driver program and pass the same to ur form...
Maybe you are looking for
-
IPhone 3GS is no longer recognized in iTunes as "mine"
The title summarizes it pretty well. When plugged in, iTunes recognizes that an iPhone is present; however, it informs me that my computer has been previously synced with another iOS device (which it has not) and allows me to either set it up as a ne
-
Installing version 8.0 or 8.1.1 on Windows Vista
Error 1935 -- installation will not complete. I have lost my pdf files for Version 7 and cannot download this new version.
-
Subreport totals are not displayed correctly in Preview
I'm using Crystal Reports 2008. I have a subreport that sorts hiearchically. It is placed in the Report Header of the main report. Within the subreport, it has calculated totals for each hiearchy grouping. When ran, those totals are incorrectly d
-
I have installed Windows 2012 Standard on a Dell Laptop XP15 L502X with an NVidia graphics card. Intel 3000 HD Graphics + NVidia GT540M The drivers for the card have been validated and work properly when running the Dell diagnostics but work in conju
-
Material attributes in PR & PO
Hi, I need to specify certain attributes of material in PR and PO (say the RPM and HP for a motor). I am planning to use the classification concept to map these attributes, i.e., I want to make two charateristics named RPM and HP and assign these to