Update infotype using class method
Hi All,
I need to update an infotype using a Class method. I need to pass a file as input to the Class Structure.
How can we pas a file as input to the Class structure.
Any pointers on this would be really helpful.
Thanks,
Saher
Hello,
You can update/insert records in Info type thru below code using FM: HR_INFOTYPE_OPERATION, but you need to get the data from the file to internal table for the same.
LOOP AT t_insert INTO w_insert.
w_pernr = w_insert-ownnum.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = w_pernr
infty = c_infty "'0105'
TABLES
infty_tab = t_0105
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
READ TABLE t_0105 INTO w_0105 WITH KEY pernr = w_insert-ownnum"#EC *
subty = c_subu.
IF sy-subrc = 0.
MOVE w_0105 TO w_p0105.
w_p0105-usrid = w_insert-lanid.
CLEAR w_0105.
ELSE.
w_p0105-pernr = w_pernr.
w_p0105-usrid = w_insert-lanid.
w_p0105-begda = sy-datum.
w_fnr = 'X'.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = w_pernr.
w_p0105-pernr = w_pernr.
IF w_fnr = 'X'.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = c_infty "'0105'
number = w_p0105-pernr
subtype = c_subu "'0001'
validityend = w_p0105-endda
validitybegin = w_p0105-begda
record = w_p0105
operation = c_oprn "'INS'
tclas = 'A'
dialog_mode = '0'
IMPORTING
return = w_return.
ELSE.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = c_infty "'0105'
number = w_p0105-pernr
subtype = c_subu "'0001'
validityend = w_p0105-endda
validitybegin = w_p0105-begda
record = w_p0105
operation = 'MOD' "'MOD'
tclas = 'A'
dialog_mode = '0'
IMPORTING
return = w_return.
ENDIF.
CLEAR w_fnr.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = w_pernr.
endloop.
Hope it helps.
Thanks,
Jayant
Similar Messages
-
A simple ALV report using classes & methods ...
i want a simple ALV report using classes & methods ...
my requirement : i have to use classes & methods instead of calling a function module to display in grid or list format.
plz send me with explanation ASAP...it's very urgent..
Thanks in advance .Hi
Please refer
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
U can use methods for vreating ALVs.
There is a method named set_table_for_first_display in OOP Concepts.
Use this Object Oriented Approach for ALV Creation
Calling the method set_table_for_first_display
CALL METHOD cust_alv->set_table_for_first_display
EXPORTING
is_layout = gst_layout
CHANGING
it_outtab = gt_list
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Object Creation and all
Creation of Object for Container
CREATE OBJECT cust_container
EXPORTING
container_name = 'ALV_CONTAINER'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Creation of Object for ALV Grid
CREATE OBJECT cust_alv
EXPORTING
i_parent = cust_container
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 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.
Layout settings
gst_layout-zebra ='X'.
gst_layout-cwidth_opt = 'X'.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'ZCS_INACTV_CUST'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 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.
Calling the method set_table_for_first_display
CALL METHOD cust_alv->set_table_for_first_display
EXPORTING
is_layout = gst_layout
CHANGING
it_outtab = gt_list
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
For object oriented concepts refer this link https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
Reaward if helpful -
Updating Infotype using function module HR_INFOTYPE_OPERATION
Hi There ,
lets understand my problem related to updation of infotype .
I have a record maintained in my table within date range 01/04/2010 to 31/12/9999.
now i update my new tax rate from 1st June 2010 .
The requirement is i shall two records now :
First record from 01/04/2010 to 31st may 2010 shall be maintained .
hence we need to modify the existing record only changing the end date .
Second record will be a new record starting from 1st june , ending 31/12/9999.
Approach followed by me :
using HR_READ_INFOTYPE to read the data .
Then using HR_INFOTYPE_OPERATION
---> ACTION : "MOD" to update existing record by passing end date as 31st may 2010 .
Then using action : INS to create a new record .
but this approach is failing since i am itself not able to modify the existing record .
Please let me know the correct way of updating the record .
Regards,
Abhishek.It depends on infotype. Every infotype has a time link.
Sometimes you can have a record for a day or more than one. You can have continuous records or not.
I think your infotype has class 1 and it's continuous in time to the end (99991231) -
ALV Reports using Class Methods
Hi Experts,
How can we generate ALV report using class and in that How can we define SLIS_EVENTS.
Can I provide all the that functionality the way I used to by calling FM
SLIS_ALV_REUSE_LIST_DISPLAY ?
- Like Header comment, event, data grouping , sort etc.
You may please send any url or document or any example.
Thanks in advance.
Regards,
Tushar ChoksiHi,
The ALV object Grid methods allow the same functionality as ALV grid report function modules but are displayed within
a screen (dialog program). SAP has provided a suit of programs which demonstrate how to For examples see standard SAP
programs as detailed below:
BCALV_EDIT_01 This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
BCALV_EDIT_02 This report illustrates how to set chosen cells of an ALV Grid Control editable.
BCALV_EDIT_03 In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE.
The report checks the input value(s) semantically and provides protocol messages in case of error
BCALV_EDIT_04 This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to
implement the saving of the new data.
BCALV_EDIT_05 This example shows how to use checkboxes within an ALV Grid Control. You learn:
(1) how to define a column for editable checkboxes for an attribute of your list
(2) how to evaluate the checked checkboxes
(3) how to switch between editable and non-editable checkboxes
BCALV_EDIT_06 This example shows how to define a dropdown listbox for all cells of one column in an editable ALV
Grid Control.
BCALV_EDIT_07 This example shows how to define dropdown listboxes for particular cells of your output table.
BCALV_EDIT_08 This report implements an ALV Grid Control with an application specific F4 help. The following aspects
are dealt with:
(1) how to replace the standard f4 help
(2) how to pass the selected value to the ALV Grid Control
(3) how to build an f4 help, whose value range depend on a value of another cell.
some links.
www.sapgenie.com
www.abap4u.com
http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
download the PDF from following link.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
Regards,
Satish -
Time Management Data Read Using Class & Methods?
Master data & Cluster data how to read using Class & Methods
Hi Ajay
To my knowledge this is caused because there are locks on registrations for these employees in R/3, probably because there using the system at the time of extraction.
To my knowledge the only way to handle this is to set "yellow" status to "green" this can be done automaticly on the InfoPackage.
I know this problem from two companies and i have not experienced any inconsistancies on data due to this proceeding.
Chris -
Triggerinng of WF using Class-Method delays for 12 hours
Hi Everyone,
I am facing a strange issue. I am using a R/3 application where WF is triggered using the FM "SWE_EVENT_CREATE", the WF gets triggered instantly. Then I created a WD application and used the method CALL METHOD cl_swf_evt_event=>raise to raise an event to trigger WF.
Even now the WF gets triggered but the delay is highly unacceptable. It takes 8-12 hours to get the Wok Item into my inbox. I refreshed the buffer using transaction SWU_OBUF but still it didn't help.
When I test my WF template in SWDD, by manually triggering WF using F8 functionality, it works instantly. Also, once I confirm WF item from inbox, it takes a lot of time for my application to know that WF is completed.
Please help me to resolve these 2 issues.
Many Regards,
RAVI.Iam not asking you to uncheck the Event linkage , instead, ok let me give you an example,
Suppose
1. IN t he SWE2 txn you have a entry like
BOR OBject type ---> <BUSXXXX> -
><BUS-EVENTNAME> -
> WS9XXXXXXX ---> <Type linkage is Active> ---> <Enable EVENT QUEUE is active>
so what i want you to check is the last but one column should be deactivated if it is active , column name is Enable Event Queue -
Hello Experts!
I am using the method CMD_EI_API=>MAINTAIN_DIRECT_INPUT to block a customer when it fails export compliance checks. It only works when the user creating an order has privileges to block the customer, which is usually not the case.
I was hoping that since this runs as part of creating an order, the system would take over to block the customer and not check the user's privileges.
Does anyone know any setting in the structures passed in where the block will take place as part of an SAP process and not under the user's role/privileges? I'm currently setting the structure element CMDS_EI_SALES_DATA-LIFSD to 'ZC' which is our custom block setting, and when the customer service rep has privileges to block the customer it works, when they don't it should still work, but it doesn't and the message returned is: You are not authorized to use Transaction XD02.
Thanks,
ScottDear Ashok,
possibly structure CMDS_EI_TAX_IND_KEY
Greetings
Winfried -
Error while updating infotype using HINUINFO_UPDATE
Hi All,
While executing the program 'HINUINFO_UPDATE'
i am getting an error 'No object identification permitted for infotype 0582, subtype LTA'.
After the approval for LTA claim is done in ESS i have executed the program 'HINUINFO_UPDATE' to update he infotypes 15 and 582. Infotype 15 is getting created but while creating the infotype 582 system gives the above error message.
In the detailed error log system gives the following message.
"You attempted to access a data record with the object identification 1. However, according to the Customizing settings, object identifications cannot be used for subtype LTA of infotype 0582".
Helpful answers will be rewarded .Solved by SAP
-
Is it possible to use method from ordinary .class file in jsp file?
If it is, please explain.org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) -
Needs to update Infotype using ALE-Change Pointers-ECC 6.0
HR Experts,
We are using ECC 6.0. There are two SAP-HR systems.. for e.g system A and B.
We would like to send data from system A to B.
If there are any changes in system A for Infotype-0, 1, 2, 6, 8, the IDOC should be generated and it should deliver and update the infotypes in system B.
What message type I have to use?
Do I have to use change pointers?
If there is only change in any one of the above infotypes then it will generate IDOC for all above infotypes or just the changed one?
Thanks in advance for your help..
MPHi Frank,
Thanks for your quick reply!
I rewarded you with the points
How I have to choose which infotypes I have to transfer in message type HRMD_A, What tcode I have to use to configure this?
Do you know the BADI or User-Exit for enhancement of custom fields?
How I have to configure to transfer only the changed records OR transfer complete data? Where should I go to do this?
Thanks for your help in advance...
MP -
[N78] Can't update firmware using telephone method
Hello everyone,
Today I tried the firmware update using the phone method because NSU not report new. I followed the instructions check the current and new version and I accepted then i got a message something like this "error occurred must restart" and returned me to device manager. Now every time i got message no updates available.
Please Help!
Update:
I again received information about new software v20.149 and after I accepted download is interrupted, and I got the same message "Error Occurred. Software update must be restarted".
Message Edited by proball on 28-Mar-2009 02:36 PM
Message Edited by proball on 28-Mar-2009 02:37 PM
Solved!
Go to Solution.GPRS is not allowed update. I have successfully updated the firmware via the WLAN network.
-
Logging all used classes + methods?
Hi
I want to be able to show the control flow of my program, so I was wondering if there is a way to log all classes and methods that are being called?
Since the program is 1500+ files I dont wanna make any code changes (like adding a logger to all methods).
I'm using Borland Jbuilder developer 2005 and JDK 1.4 (but could upgrade to a later java version if that makes a difference)Use LimpidLog from http://www.acelet.com/limpidlog/
You do not need to hard-code any log statement. You can Get everything without doing anything!
It is a revolutionay logging system. It is open source.
SuperDebugger from http://www.acelet.com/super/SuperDebugger/index.html can read records of LimpidLog. It is a GUI debugger. -
Best Practice for Updating Infotype HRP1001 via Class / Methods
I want to update an existing (custom) relationship between two positions.
For example I want
Position 1 S = '50007200'
Position 2 S = '50007202'
Relationship = 'AZCR'
effective today through 99991231
Is there a best practice or generally accepted way for doing this using classes/methods rather than RH_INSERT_INFTY ?
If so, please supply an example.
Thanks...
....MikeHi Scott
You can use a BAPI to do that.
Check the following thread:
BAPI to update characteristics in Material master?
BR
Caetano -
Need class method example for updating infoype15
Hi All,
I need to update infotype 15 without using BDC and HR_INFOTYPE_OPERATION function module, i have suggexted to use Class methods please can any one help in this regards with sample code of updation of infotype with class methods,
Regards,
ReddyHi
You can use the following interface:
IF_HRPA_PLAIN_INFOTYPE_ACCESS - HR: Writing Infotype Records
Interface for Writing Infotypes
This interface permits simplified write accesses for infotypes. In particular, such accesses function for "simple" infotypes only. By definition, all infotypes that use CL_HRPA_INFOTYPE_CONTAINER as container class are simple. All other infotypes cannot be processed or can only be processed in a basic way using this interface.
Regards -
Control problem in trees using class
Hi all i am creating tree structure using class method in that when i am creating only one node it is working properly but when i try to crate multiple nodes it is giving me dump my program is as follow.
I search these on sdn and try the things but it still giving me same error.
*& Report ZIRPT_HR_TEST_SPLITTER_01
report zirpt_hr_test_splitter_01.
tables : pa0001,t582s.
select-options : p_pernr for pa0001-pernr no intervals.
* CLASS screen_init DEFINITION
class screen_init definition create private.
public section.
class-methods init_screen.
methods constructor.
private section.
data: splitter_h type ref to cl_gui_splitter_container,
splitter_v type ref to cl_gui_splitter_container,
picture type ref to cl_gui_picture,
tree type ref to cl_gui_simple_tree,
it_pa0001 type table of pa0001,
it_pa0000 type table of pa0000.
methods: fill_tree,
fill_picture.
endclass. "screen_init DEFINITION
* CLASS screen_handler DEFINITION
class screen_handler definition.
public section.
methods: constructor importing container
type ref to cl_gui_container,
handle_node_double_click
for event node_double_click
of cl_gui_simple_tree
importing node_key.
private section.
data: html_viewer type ref to cl_gui_html_viewer,
it_pa0001 type table of pa0001,
it_pa0000 type table of pa0000,
list_viewer type ref to cl_gui_alv_grid.
methods:
fill_list importing pernr type pa0001-pernr
infty type t582s-infty.
endclass. "screen_handler DEFINITION
* CLASS screen_init IMPLEMENTATION
class screen_init implementation.
method init_screen.
data screen type ref to screen_init.
create object screen.
endmethod. "init_screen
method constructor.
data: events type cntl_simple_events,
event like line of events,
event_handler type ref to screen_handler,
container_left type ref to cl_gui_container,
container_right type ref to cl_gui_container,
container_top type ref to cl_gui_container,
container_bottom type ref to cl_gui_container.
create object splitter_h
exporting
parent = cl_gui_container=>screen0
rows = 1
columns = 2.
call method splitter_h->set_border
exporting
border = cl_gui_cfw=>false.
call method splitter_h->set_column_mode
exporting
mode = splitter_h->mode_absolute.
call method splitter_h->set_column_width
exporting
id = 1
width = 110.
container_left = splitter_h->get_container( row = 1 column = 1 ).
container_right = splitter_h->get_container( row = 1 column = 2 ).
create object splitter_v
exporting
parent = container_left
rows = 2
columns = 1.
call method splitter_v->set_border
exporting
border = cl_gui_cfw=>false.
call method splitter_v->set_row_mode
exporting
mode = splitter_v->mode_absolute.
call method splitter_v->set_row_height
exporting
id = 1
height = 160.
container_top = splitter_v->get_container( row = 1 column = 1 ).
container_bottom = splitter_v->get_container( row = 2 column = 1 ).
create object picture
exporting parent = container_top.
create object tree
exporting parent = container_bottom
node_selection_mode =
cl_gui_simple_tree=>node_sel_mode_single.
create object event_handler
exporting container = container_right.
event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
event-appl_event = ' '.
append event to events.
call method tree->set_registered_events
exporting
events = events.
set handler event_handler->handle_node_double_click for tree.
call method: me->fill_tree,
me->fill_picture.
call method cl_gui_cfw=>flush.
endmethod. "constructor
method fill_picture.
types pict_line(256) type c.
data pict_tab type table of pict_line.
data url(255) type c.
data : file type rlgrap-filename value 'C:\Documents and Settings\sapgroup.NITCOWRL\My Documents\nitco.gif'.
translate file to upper case.
*CALL FUNCTION 'WS_UPLOAD'
*EXPORTING
*filename = file
*filetype = 'BIN'
*TABLES
*data_tab = pict_tab.
data query_table_wa type w3query.
data query_table type table of w3query." OF like w3query occurs 1 with header line.
data html_table type table of w3html." like w3html occurs 1.
data return_code type w3param-ret_code.
data content_type type w3param-cont_type.
data content_length type w3param-cont_len.
data pic_data type table of w3mime." like w3mime occurs 0.
data pic_size type i.
refresh query_table.
query_table_wa-name = '_OBJECT_ID'.
query_table_wa-value = 'ENJOYSAP_LOGO'.
append query_table_wa to query_table.
call function 'WWW_GET_MIME_OBJECT'
tables
query_string = query_table
html = html_table
mime = pic_data
changing
return_code = return_code
content_type = content_type
content_length = content_length
exceptions
object_not_found = 1
parameter_not_found = 2
others = 3.
if sy-subrc = 0.
pic_size = content_length.
endif.
call function 'DP_CREATE_URL'
exporting
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
tables
data = pic_data
changing
url = url
exceptions
others = 1.
*IMPORT pict_tab = pict_tab FROM DATABASE abtree(pi) ID 'FLIGHTS'.
*CALL FUNCTION 'DP_CREATE_URL'
*EXPORTING
*type = 'IMAGE'
*subtype = 'GIF'
*TABLES
*data = pict_tab
*CHANGING
*url = url.
call method picture->load_picture_from_url
exporting
url = url.
call method picture->set_display_mode
exporting
display_mode = picture->display_mode_fit_center.
* CALL METHOD cl_gui_cfw=>flush.
endmethod. "fill_picture
method fill_tree.
data: node_table type table of abdemonode,
node type abdemonode.
*data : it_pa0001 TYPE TABLE OF p0001,
data :wa_pa0001 type pa0001,
wa_pa0000 type pa0000,
it_t582s type table of t582s,
wa_t582s type t582s.
types : begin of ttab,
itext type t582s-itext,
infty type t582s-infty,
pernr type p0001-pernr,
end of ttab.
data : itab type table of ttab,
wa_tab type ttab.
field-symbols : <fs> like p_pernr.
data : text1 type c.
node-hidden = ' '.
node-disabled = ' '.
node-isfolder = 'X'.
node-expander = ' '.
select * from t582s
into corresponding fields of table it_t582s
where sprsl = sy-langu
and infty in ('0001','0000')."'0002','0006',
* '0008','0015','0019').
loop at it_t582s into wa_t582s .
move-corresponding wa_t582s to wa_tab.
node-node_key = wa_t582s-infty.
clear node-relatkey.
clear node-relatship.
node-text = wa_t582s-itext.
node-n_image = ' '.
node-exp_image = ' '.
append node to node_table.
loop at p_pernr assigning <fs>.
wa_tab-pernr = <fs>-low.
append wa_tab to itab.
clear p_pernr-low.
node-node_key = <fs>-low.
node-relatkey = wa_tab-infty.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-text = <fs>-low.
node-n_image = '@AV@'.
append node to node_table.
endloop.
* SELECT SINGLE * FROM pa0001 INTO wa_pa0001 WHERE pernr in p_pernr.
* WHEN '0000'.
* SELECT SINGLE * FROM pa0000 INTO wa_pa0000 WHERE pernr = p_pernr.
* wa_tab-pernr = wa_pa0000-pernr.
* endcase.
clear : wa_tab,wa_pa0001,wa_pa0000.
endloop.
*node-hidden = ' '.
*node-disabled = ' '.
*node-isfolder = 'X'.
*node-expander = ' '.
*LOOP AT itab INTO wa_tab.
*AT NEW infty.
*node-node_key = wa_tab-infty.
*CLEAR node-relatkey.
*CLEAR node-relatship.
*node-text = wa_tab-itext.
*node-n_image = ' '.
*node-exp_image = ' '.
*APPEND node TO node_table.
*ENDAT.
*AT NEW pernr.
* node-node_key = wa_tab-pernr.
*node-relatkey = wa_tab-infty.
*node-relatship = cl_gui_simple_tree=>relat_last_child.
*node-text = wa_tab-pernr.
*node-n_image = '@AV@'.
*node-exp_image = '@AV@'.
*ENDAT.
*APPEND node TO node_table.
*ENDLOOP.
call method tree->add_nodes
exporting
table_structure_name = 'ABDEMONODE'
node_table = node_table.
* CALL METHOD cl_gui_cfw=>flush.
endmethod. "fill_tree
endclass. "screen_init IMPLEMENTATION
* CLASS screen_handler IMPLEMENTATION
class screen_handler implementation.
method constructor.
create object: html_viewer exporting parent = container,
list_viewer exporting i_parent = container.
endmethod. "constructor
method handle_node_double_click.
data: infty type t582s-infty,
pernr type pa0001-pernr.
infty = node_key(4).
pernr = node_key+4(8).
*IF pernr IS INITIAL.
*CALL METHOD: fill_html EXPORTING infty = infty,
*html_viewer->set_visible EXPORTING visible = 'X',
*list_viewer->set_visible EXPORTING visible = ' '.
*ELSE.
call method: fill_list exporting infty = infty
pernr = pernr,
list_viewer->set_visible exporting visible = 'X',
html_viewer->set_visible exporting visible = ' '.
*ENDIF.
* CALL METHOD cl_gui_cfw=>flush.
endmethod. "handle_node_double_click
*METHOD fill_html.
*DATA url TYPE scarr-url.
*SELECT SINGLE url
*FROM scarr
*INTO url
*WHERE infty = infty.
*CALL METHOD html_viewer->show_url EXPORTING url = url.
*ENDMETHOD.
method fill_list.
data: flight_tab type table of demofli,
begin of flight_title,
carrname type scarr-carrname,
cityfrom type spfli-cityfrom,
cityto type spfli-cityto,
end of flight_title,
list_layout type lvc_s_layo.
*DATA : it_pa0001 TYPE TABLE OF p0001.
if infty = '0001'.
select * from pa0001 into table it_pa0001 where pernr = pernr.
elseif infty = '0000'.
select * from pa0001 into table it_pa0001 where pernr = pernr.
endif.
*SELECT SINGLE c~carrname p~cityfrom p~cityto
*INTO CORRESPONDING FIELDS OF flight_title
*FROM ( scarr AS c
*INNER JOIN spfli AS p ON c~carrid = p~carrid )
*WHERE p~carrid = carrid AND
*p~connid = connid.
*SELECT fldate seatsmax seatsocc
*INTO CORRESPONDING FIELDS OF TABLE flight_tab
*FROM sflight
*WHERE carrid = carrid AND connid = connid
* ORDER BY fldate.
*CONCATENATE flight_title-carrname
*connid
*flight_title-cityfrom
*flight_title-cityto
list_layout-grid_title = 'TEST'.
list_layout-smalltitle = 'X'.
list_layout-cwidth_opt = 'X'.
list_layout-no_toolbar = 'X'.
*if infty = '0001'.
call method list_viewer->set_table_for_first_display
exporting
i_structure_name = 'PA0001'
is_layout = list_layout
changing
it_outtab = it_pa0001.
* CALL METHOD cl_gui_cfw=>flush.
*ELSEIF infty = '0001'.
*CALL METHOD list_viewer->set_table_for_first_display
*EXPORTING i_structure_name = 'PA0000'
*is_layout = list_layout
*CHANGING it_outtab = it_pa0000.
*endif.
endmethod. "fill_list
endclass. "screen_handler IMPLEMENTATION
start-of-selection.
data : it_pa0001 type table of p0001.
call screen 100.
* MODULE status_0100 OUTPUT
module status_0100 output.
set pf-status 'SCREEN_100'.
set titlebar 'TIT_100'.
call method screen_init=>init_screen.
* CALL METHOD cl_gui_cfw=>flush.
endmodule. "status_0100 OUTPUT
* MODULE cancel INPUT
module cancel input.
set screen 0.
leave program.
endmodule. "cancel INPUT
Plz Suggest ,
Regards ,
Paresh G.METHOD fill_tree.
DATA: node_table TYPE TABLE OF abdemonode,
node TYPE abdemonode.
*data : it_pa0001 TYPE TABLE OF p0001,
DATA :wa_pa0001 TYPE pa0001,
wa_pa0000 TYPE pa0000,
it_t582s TYPE TABLE OF t582s,
wa_t582s TYPE t582s.
TYPES : BEGIN OF ttab,
itext TYPE t582s-itext,
infty TYPE t582s-infty,
pernr TYPE p0001-pernr,
END OF ttab.
DATA : itab TYPE TABLE OF ttab,
wa_tab TYPE ttab.
FIELD-SYMBOLS : <fs> LIKE p_pernr.
DATA : text1 TYPE c.
node-hidden = ' '.
node-disabled = ' '.
node-isfolder = 'X'.
node-expander = ' '.
SELECT * FROM t582s
INTO CORRESPONDING FIELDS OF TABLE it_t582s
WHERE sprsl = sy-langu
AND infty IN ('0001','0000')."'0002','0006',
'0008','0015','0019').
LOOP AT it_t582s INTO wa_t582s .
MOVE-CORRESPONDING wa_t582s TO wa_tab.
node-node_key = wa_t582s-infty.
CLEAR node-relatkey.
CLEAR node-relatship.
node-text = wa_t582s-itext.
node-n_image = ' '.
node-exp_image = ' '.
APPEND node TO node_table.
LOOP AT p_pernr ASSIGNING <fs>.
wa_tab-pernr = <fs>-low.
APPEND wa_tab TO itab.
CLEAR p_pernr-low.
node-node_key = <fs>-low.
node-relatkey = wa_tab-infty.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-text = <fs>-low.
node-n_image = '@AV@'.
APPEND node TO node_table.
ENDLOOP.
CLEAR : wa_tab,wa_pa0001,wa_pa0000.
ENDLOOP.
CALL METHOD tree->add_nodes
EXPORTING
table_structure_name = 'ABDEMONODE'
node_table = node_table.
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "fill_tree
Maybe you are looking for
-
Get Item price based on Price List
Hi all, anyone has some sample of how to get the price for an item based on a specified price list, selected by the user, following the SAP's rules for assigning item price? I've used the GetItemPrice method, but it doesn't need a price list referenc
-
How to play the avi files?
-
Sending Emails w/Attachments
Hi, Does anyone know how I can send an email from Solaris with an attachment file? I tried looking at the mailx manual but did find anything like that? Any help is greatly appreciated. Edwin
-
When I try to play any track, any at all it goes into "Pause" and even if i press play it goes back to "pause". The diamond doesn't move. Any help would be gratefully recieved Thanks
-
i am using PCI-6033E IO card and i would like to send 5 volts (high logic ) to the trigger box. the trigger box will trigger the frame grabber card, that i am using for image acquisition.