Plz help on populating idoc extention invoic02
I have extenden the invoic02 idoc with the segmenta zfaktura as a child segmet for E1EDKA1
The name of the extention is ZINVOIC02_EXTENTION
I want the segment to apear only once based on the condition of partner function
, but it appears each time the segment E1EDKA1 which in this case appears 5 times.
When I try to populate the new fields .
Any help would do
Thanks.
This is the code I am using in the user exit 001. Enhancement LVEDF001.
TABLES : KNA1 , MARA , EQUI , E1EDK01 , ZFAKTURA.
CHECK control_record_out-mestyp EQ 'INVOIC'.
CHECK int_edidd-segnam EQ 'E1EDKA1'.
LOOP AT int_edidd.
CASE int_edidd-segnam.
WHEN ' E1EDKA1'.
control_record_out-cimtyp = 'ZINVOIC02_EXTENTION'.
MOVE int_edidd-SDATA TO E1EDKA1.
If E1EDKA1- PARVW eq RE
clear int_edidd.
Select from equi.
ZFAKTURA-equnr = equi-equnr.
ZFAKTURA-eqart = equi-eqart.
Select from KNA1
ZFAKTURA-EAN11 = KNA1-EAN11
int_edidd-segnam = 'ZFAKTURA'.
int_edidd-sdata = ZFAKTURA.
append int_edidd.
CLEAR E1EDKA1
Endif.
ENDCASE.
ENDLOOP.
answered
Similar Messages
-
Plz help me ALE/IDOC Scinario documentation
hi and all,
plz help me ale/idoc scinarios documentation plz send to me.
thanking u one and all.Hi
ALE:
check url
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/ale/configuration.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapdevelopment.co.uk/training
And also u can get lots of inof from the below link.
http://www.sapgenie.com/ale/why_ale.htm
Outbound:
Step 1. Application document is created when transaction is saved.
2. Message control is invoked.
3. Messages are processed by system.
4. Messages are Edited (if desired).
5. Output (ALE / EDI) is checked
6. Validate against Message control record from Partner Profile
7. Application Document is saved.
8. Entry NAST table is created for every selected output program
along with Medium & Timing.
9. Check for Process Immediately .
If (yes)
Determine Processing Program from TNAPR Table.
ELSE
Execute RSNASTED Program.
10. Read Partner Profile to determine Process Code.
11. Process Code points to the Function Module & Invoked.
12. IDoc is generated.
13. Check for ALE Request.
if (Yes)
Perform Filters, Conversions, Version Changes etc.
Else.
IDoc is stored in DATABASE.
INBOUND:
Step 1. EDI Subsystem creates an IDoc file from EDI Messages
2. Subsystem calls Functional Module EDI_DATA_INCOMING from
startRFC program.
3. Data in Control Record is validate against the Partner Profile.
4. IDoc is generated in Database and syntax check is carried out.
5. IDoc file is deleted once file read.
6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
7. Check for Process Immediately.
If NO
Execute RBDAPP01 Program
Else
Read Process Code from Partner Profile
Process Code Points to Function Module
Application Document Posted.
IDOC
Data Creation in Idoc
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
IDoc is a intermediate document to exchange data between two SAP Systems.
*IDocs are structured ASCII files (or a virtual equivalent).
*Electronic Interchange Document
*They are the file format used by SAP R/3 to exchange data with foreign systems.
*Data Is transmitted in ASCII format, i.e. human readable form
*IDocs exchange messages
*IDocs are used like classical interface files
IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
FOr testing you can use WE19.
How to create idoc?
*WE30 - you can create a IDOC type
For more information in details on the same along with the examples can be viewed on:
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
http://www.sappoint.com/presentation.html
http://www.allsaplinks.com/idoc_search.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Check these out..
Re: How to create IDOC
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
go trough these links.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
imp links
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sappoint.com
--here u can find the ppts and basic seetings for ALE
http://sappoint.com/presentation.html
www.sapgenie.com
http://www.sapgenie.com/ale/index.htm
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
Try this..Hope this will help.
>>>> SAP ALE & IDOC<<<<
Steps to configuration(Basis) >>
1. Create Logical System (LS) for each applicable ALE-enabled client
2. Link client to Logical System on the respective servers
3. Create background user, to be used by ALE(with authorizaton for ALE postings)
4. Create RFC Destinations(SM59)
5. Ports in Idoc processing(WE21)
6. Generate partner profiles for sending system
The functional configuration(Tcode: SALE)
Create a Customer Distribution Model (CDM);
Add appropriate message types and filters to the CDM;
Generate outbound partner profiles;
Distribute the CDM to the receiving systems; and
Generate inbound partner profiles on each of the clients.
Steps to customize a new IDoc >>>
1. Define IDoc Segment (WE31)
2. Convert Segments into an IDoc type (WE30)
3. Create a Message Type (WE81)
4. Create valid Combination of Message & IDoc type(WE82)
5. Define Processing Code(WE41 for OUT / WE42 for IN)
6. Define Partner Profile(WE20)
Important Transaction Codes:
SALE - IMG ALE Configuration root
WE20 - Manually maintain partner profiles
BD64 - Maintain customer distribution model
BD71 - Distribute customer distribution model
SM59 - Create RFC Destinations
BDM5 - Consistency check (Transaction scenarios)
BD82 - Generate Partner Profiles
BD61 - Activate Change Pointers - Globally
BD50 - Activate Change Pointer for Msg Type
BD52 - Activate change pointer per change.doc object
BD59 - Allocation object type -> IDOC type
BD56 - Maintain IDOC Segment Filters
BD53 - Reduction of Message Types
BD21 - Select Change Pointer
BD87 - Status Monitor for ALE Messages
BDM5 - Consistency check (Transaction scenarios)
BD62 - Define rules
BD79 - Maintain rules
BD55 - Defining settings for IDoc conversion
WEDI - ALE IDoc Administration
WE21 - Ports in Idoc processing
WE60 - IDoc documentation
SARA - IDoc archiving (Object type IDOC)
WE47 - IDoc status maintenance
WE07 - IDoc statistics
BALE - ALE Distribution Administration
WE05 - IDoc overview
BD87 - Inbound IDoc reprocessing
BD88 - Outbound IDoc reprocessing
BDM2 - IDoc Trace
BDM7 - IDoc Audit Analysis
BD21 - Create IDocs from change pointers
SM58 - Schedule RFC Failures
Basic config for Distributed data:
BD64: Maintain a Distributed Model
BD82: Generate Partner Profile
BD64: Distribute the distribution Model
Programs
RBDMIDOC Creating IDoc Type from Change Pointers
RSEOUT00 Process all selected IDocs (EDI)
RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
RSARFCEX - Execute Calls Not Yet Executed
RBDMOIND - Status Conversion with Successful tRFC Execution
RBDMANIN - Start error handling for non-posted IDocs
RBDSTATE - Send Audit Confirmations
FOr testing you can use WE19.
Check these links.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
Please check this PDF documents for ALE and IDoc.
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
<b>Reward points for useful Answers</b>
Regards
Anji -
Hi guru's what is RSEOUT00 in ale idocs plz help me
hi guru's what is RSEOUT00 in ale idocs plz help me
Hi,
Check this link u will find ur answer
<u>sap.ittoolbox.com/groups/technical-functional/sap-interfaces/idoc-status-remains-at-30-427371</u>
sap.ittoolbox.com/groups/technical-functional/sap-wf/idoc-process-509096
www.erpgenie.com/sap/sapedi/operations.htm
Hope it is answered....
Regards,
sana.
reward if useful.... -
Experts plz help its very urgent
hi expert
plz help- me
previously i was getting dump in this statement
TRANSFER v_tab TO p_file.
FYI:
here v_tab is a table which hav som records
and p_file contains the path of a file like c:\new\ggg.txt
DATA: v_tab TYPE STANDARD TABLE OF t_line WITH HEADER LINE,
TYPES: BEGIN OF t_line,
pspid(9) TYPE c,
tab1 TYPE x,
post1 TYPE proj-post1,
tab2 TYPE x,
vernr TYPE prps-vernr,
tab3 TYPE x,
END OF t_line.
DUMP I WAS GETTIN :
For the statement
"TRANSFER f TO ..."
only character-type data objects are supported at the argument position
"f".
In this case. the operand "f" has the non-character-type "T_LINE". The
current program is a Unicode program. In the Unicode context, the type
'X' or structures containing not only character-type components are
regarded as non-character-type.
to avoid this dump i used feild symbol
assign V_TAB to <IN> casting.
p_file = <in>.
unassign <IN>.
nw there is no dump
but problem is p_file contains the contents of v_tab not the file path .
plz help me its very urgent
thanx in advanceHey, no probs,
after your initial declaration, do this.
TYPES: BEGIN OF n_line,
pspid(9) TYPE c,
tab1(15) TYPE c, "check the length you want
post1 TYPE proj-post1,
tab2(15) TYPE c, "check the length you want
vernr TYPE prps-vernr,
tab3(15) TYPE c, "check the length you want
END OF t_line.
DATA: n_tab TYPE STANDARD TABLE OF n_line WITH HEADER LINE.
now after you fetch data into v_tab,
move it to n_tab.
using a loop at v_tab and move corresponding fields to n_tab's work area
append to n_tab.
once you have populated n_tab and are ready to TRANSFER.
OPEN your file using
open dataset <file> for output in text mode encoding default.
now
loop at n_tab.
TRANSFER n_tab to p_file.
endloop.
CLOSE DATASET. -
How to install adapters in pi 7.0 ex(tibco adapter) its urgent plz help
hi friends
can any one help me how to insatlll the tibco adapter in pi 7.0 its urgent plz help
thanks in advance
bye
rajaHi Raj,
Is your Sender System Tibco If so Use JMS Adapter to get the Data from tibco and Use IDOC Adapter to Post in R3. For this you no need to Install any Adapter in XI System.
Similar discussions ,
XI integration with Tibco
XI Integration with Tibco EMS (Using JMS Adapter)
Regards
Agasthuri Doss -
here am giving description for my dought
i have to write ,in EDI-IDOC MAPPING USING SEE-BURGER adapter,in that mapping condition is ,When data found in ST01, map synonym of source GS02 using table GSNDPRNI
in IDOC format should be 10 digits padded to left with zeros.
here EDI segment GS02,& idoc segment is EDI_DC- SDNPRN.
PLZ HELP ME FOR HOW TO MAP THESE TO FIELDS.Hi Rohit.
While doing the mapping for STO1, check if the length of STO1 is greater than zero. if it is greater than zero, now map GS02 to it's target field. use a udf to pad the value of the GS02 field with zeros.
Hope this helps u.
Regards,
Hari -
Hi Abap Experts
I'm Bharadwaj, New to this fourm
can any one help me on idoc ....
how to create idoc ,how to test idoc ,how to post idoc ,how to test status of idoc.
is there any good links is there ....
if it is possible plz send me sample code for idoc.
Thnx in advance.
Cheers.
BharadwajHi bharadwaj,
welcome to sdn world.
below link might help you.
http://help.sap.com/saphelp_erp2004/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
check these also....
BC620 - SAP Idoc Interface Technology
BC621 - SAP Idoc Interface Development
reward wtih points for helpfull answers and close the thread if your question is solved.
regards,
venu. -
Hi experts
plz help
i have createed an alv using slis method
in the output there must come a header
in this header i ill have to show som details
like on the left side of the header i want to show the details of the user and on the right side i want to show he data of vendor .
i am able to get the data in the left side but i am not able to show the data of vendor on the right side
the data of vendor is by default coming on left side only just below the details of user but i want to show those details on the right side of the header .
plz tell me how to do it .
thanx in advance.Hi Anit,
I am attaching here the whole Code. It is somewhat big code so go through it thoroughly.If you still face problem reply this thread otherwise <b>REWARD POINT</b>.
REPORT test
MESSAGE-ID zzrefn01
NO STANDARD PAGE HEADING
*** Portrait: 93x80
LINE-SIZE 150
LINE-COUNT 80.
*** Landscape: 132x65
LINE-SIZE 132
LINE-COUNT 65.
INCLUDES **
INCLUDE zbc_i00. "Customer Standard Include
INCLUDE <icon>. "For Button on the ALV Tool Bar
INCLUDE yyef_check_isp_top.
INCLUDE yyef_check_isp_f01.
INCLUDE yyef_check_isp_o01.
INCLUDE yyef_check_isp_i01.
CLASS zcl_event_handler IMPLEMENTATION
CLASS zcl_event_handler IMPLEMENTATION.
Top-of-page event
METHOD top_of_page.
PERFORM event_top_of_page
USING z_dyndoc_id.
ENDMETHOD. "METHOD top_of_page
Change Status Button
METHOD handle_toolbar.
IF NOT pa_prodr IS INITIAL.
DATA: lz_toolbar TYPE stb_button.
CLEAR lz_toolbar.
MOVE 'CHANGE_STATUS' TO lz_toolbar-function.
MOVE text-001 TO lz_toolbar-text.
APPEND lz_toolbar TO e_object->mt_toolbar.
ENDIF. "IF NOT pa_prodr IS INITIAL
ENDMETHOD. "METHOD handle_toolbar
Handle User Command
METHOD handle_user_command.
CASE e_ucomm.
WHEN 'CHANGE_STATUS'.
LOOP AT it_output
INTO wa_output.
IF wa_output-chk_box EQ kc_x.
z_flag = 1.
EXIT.
ENDIF. "IF wa_output-chk_box EQ kc_x
ENDLOOP. "LOOP AT it_output INTO wa_output
IF z_flag EQ 1.
PERFORM display_selected_data.
ELSE.
MESSAGE i001(zzrefn01)
WITH text-023.
ENDIF. "IF z_flag EQ 1
ENDCASE. "CASE e_ucomm
ENDMETHOD. "METHOD handle_user_command
ENDCLASS. "zcl_event_handler IMPLEMENTATION
Processing of selection screen **
First time initialization *
Get Default variant *
INITIALIZATION.
z_repid = sy-repid.
PERFORM variant_init.
zx_variant = z_variant.
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = kc_u
CHANGING
cs_variant = zx_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 0.
pa_vari = zx_variant-variant.
ELSE.
MESSAGE i001(zzrefn01)
WITH text-021.
ENDIF. "IF sy-subrc EQ 0
*** First time initialization in online mode except calls with variant
*** (is not processed on return from prog to selection screen)
pa_xyz = ....
so_xyz.....
SET PF-STATUS 'STAT1000'.
*** An example for select options restrictions is available
*** in TT1/YYKA_EXPORT_START_HOST (remove comment)
Selection screen PBO *
Comment........ *
AT SELECTION-SCREEN OUTPUT.
*** Init selection screen, also on variants
*** (only for online reports)
IF NOT zn_init_seldynp IS INITIAL
AND sy-batch IS INITIAL "Not on batch calls (e.g. AutoSys)
AND sy-slset IS INITIAL. "Not on calls with variant
IF NOT pa_prodr IS INITIAL.
CLEAR: pa_prodr.
MESSAGE w999(zbcc). "Flag prod.run reseted
ENDIF.
CLEAR: pa_start.
ENDIF.
CLEAR: zn_init_seldynp.
*** Process dynpro fields
LOOP AT SCREEN.
*** --> Read-Only fields
IF screen-group1 EQ 'RDO'
AND screen-input NE '0'
AND screen-group3 NE 'VPU'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Selection screen PAI *
Comment........ *
*AT SELECTION-SCREEN ON so_xyz.
AT SELECTION-SCREEN.
PERFORM pai_of_selection_screen.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM f4_for_variant.
PERFORM btci_at_sel_screen. "Call BTCI checks (optional)
Program **
Main routine *
START-OF-SELECTION.
PERFORM fetch_data.
PERFORM build_data.
PERFORM prepare_field_catalog
CHANGING it_fieldcat.
CALL SCREEN 100.
End routine *
END-OF-SELECTION.
Interactive Reporting **
Comment........ *
AT LINE-SELECTION.
*** Good example in TT1/YIIHART (remove comment)
Comment........ *
AT USER-COMMAND.
PERFORM handle_user_command.
Comment........ *
AT PFN.
iNCLUDE YYEF_CHECK_ISP_F01
*& Include YYEF_CHECK_ISP_F01 *
*& Form pai_of_selection_screen
Check Variant Exist or not
FORM pai_of_selection_screen .
IF NOT pa_vari IS INITIAL.
MOVE z_variant TO zx_variant.
MOVE pa_vari TO zx_variant-variant.
CALL FUNCTION 'LVC_VARIANT_EXISTENCE_CHECK'
EXPORTING
i_save = kc_u
CHANGING
cs_variant = zx_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 2.
MESSAGE i001(zzrefn01)
WITH text-024.
ENDIF. "IF sy-subrc EQ 2
z_variant = zx_variant.
ELSE.
PERFORM variant_init.
ENDIF. "IF NOT pa_vari IS INITIAL
ENDFORM. "pai_of_selection_screen
*& Form variant_init
Initialization of Variant
FORM variant_init .
CLEAR z_variant.
z_variant-report = z_repid.
ENDFORM. " variant_init
*& Form f4_for_variant
F4 Help for Layout
FORM f4_for_variant .
CALL FUNCTION 'LVC_VARIANT_F4'
EXPORTING
is_variant = z_variant
i_save = kc_u
IMPORTING
e_exit = z_exit
es_variant = zx_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 1.
MESSAGE i001(zzrefn01)
WITH text-022.
ELSE.
IF z_exit = space.
pa_vari = zx_variant-variant.
ENDIF. "IF z_exit = space
ENDIF. "IF sy-subrc EQ 1
ENDFORM. "f4_for_variant
*& Form fetch_data
Fetch data from DB tables.
FORM fetch_data .
SELECT *
FROM yyeft1200
INTO TABLE it_yyeft1200
WHERE id_rech IN so_idrec
AND fnumkred IN so_fnumk
AND status IN so_stat
AND erdat IN so_erdat
ORDER BY PRIMARY KEY.
IF sy-subrc EQ 0.
SELECT *
FROM yyeft1201
INTO TABLE it_yyeft1201
FOR ALL ENTRIES IN it_yyeft1200
WHERE id_rech EQ it_yyeft1200-id_rech
AND artnr_bp IN so_artnr
ORDER BY PRIMARY KEY.
IF sy-subrc EQ 0.
SELECT *
FROM yyeft1008
INTO TABLE it_yyeft1008
FOR ALL ENTRIES IN it_yyeft1201
WHERE bp_refnr EQ it_yyeft1201-bprefnr.
IF sy-subrc EQ 0.
SORT it_yyeft1008[] BY bp_refnr.
ENDIF. "IF sy-subrc EQ 0.
ENDIF. "IF sy-subrc EQ 0.
ELSE.
zn_cancel = kc_x.
ENDIF. "IF sy-subrc EQ 0.
ENDFORM. " fetch_data
*& Form build_data
Gather the data from all the internal tables into one.
FORM build_data .
LOOP AT it_yyeft1200
INTO wa_yyeft1200.
CLEAR wa_output.
wa_output-id_rech = wa_yyeft1200-id_rech.
wa_output-fnumkred = wa_yyeft1200-fnumkred.
wa_output-status = wa_yyeft1200-status.
wa_output-erdat = wa_yyeft1200-erdat.
wa_output-bukrs = wa_yyeft1200-bukrs.
wa_output-belnr = wa_yyeft1200-belnr.
wa_output-gjahr = wa_yyeft1200-gjahr.
IF wa_yyeft1200-status GE kc_status10
AND wa_yyeft1200-belnr IS INITIAL.
wa_output-com_delfnd = 'FI Doc NOT found'(t03).
ENDIF.
IF wa_yyeft1200-status LT kc_status10
AND NOT wa_yyeft1200-belnr IS INITIAL
AND wa_output-com_delfnd IS INITIAL
AND NOT pa_det IS INITIAL.
wa_output-com_delfnd = 'FI Doc should be empty'(t01).
ENDIF.
LOOP AT it_yyeft1201
INTO wa_yyeft1201
WHERE id_rech EQ wa_yyeft1200-id_rech.
wa_output-bprefnr = wa_yyeft1201-bprefnr.
wa_output-lfdat = wa_yyeft1201-lfdat.
wa_output-artnr_bp = wa_yyeft1201-artnr_bp.
READ TABLE it_yyeft1008
WITH KEY bp_refnr = wa_yyeft1201-bprefnr
BINARY SEARCH
TRANSPORTING NO FIELDS.
IF sy-subrc EQ 0.
LOOP AT it_yyeft1008
INTO wa_yyeft1008
FROM sy-tabix.
IF wa_yyeft1008-bp_refnr NE wa_yyeft1201-bprefnr.
EXIT.
ENDIF.
wa_output-id_anlief = wa_yyeft1008-id_anlief.
IF NOT pa_det IS INITIAL
OR NOT wa_output-com_delfnd IS INITIAL.
APPEND wa_output TO it_output.
ENDIF.
ENDLOOP. "LOOP AT it_yyeft1008
ELSE.
CLEAR wa_output-id_anlief.
wa_output-com_delfnd = 'Deliv. NOT found'(t06).
APPEND wa_output TO it_output.
ENDIF.
ENDLOOP. "LOOP AT it_yyeft1201
IF sy-subrc NE 0.
wa_output-com_delfnd = 'No Detail records in YYEFT1201'(e01).
APPEND wa_output TO it_output.
ENDIF. "IF sy-subrc NE 0.
ENDLOOP. "LOOP AT it_yyeft1200
Checkbox Editable for Production Run
IF pa_prodr IS INITIAL.
LOOP AT it_output
INTO wa_output.
zs_style-fieldname = 'CHK_BOX'.
zs_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT zs_style INTO TABLE wa_output-celltab.
MODIFY it_output FROM wa_output
TRANSPORTING celltab.
ENDLOOP. "LOOP AT it_output INTO wa_output.
ENDIF. "IF pa_prodr IS INITIAL
LOOP AT it_output
INTO wa_output.
IF wa_output-status GE kc_status10
AND wa_output-belnr IS INITIAL
AND NOT pa_prodr IS INITIAL.
zs_style-fieldname = 'CHK_BOX'.
zs_style-style = cl_gui_alv_grid=>mc_style_enabled.
INSERT zs_style INTO TABLE wa_output-celltab.
MODIFY it_output FROM wa_output
TRANSPORTING celltab.
ENDIF. "IF wa_output-status GE kc_status10
ENDLOOP. "LOOP AT it_output INTO wa_output
ENDFORM. "build_data
*& Form prepare_field_catalog
Field Catalog Preparation
<--PIT_FIELDCAT Field catalog
FORM prepare_field_catalog
CHANGING pit_fieldcat TYPE lvc_t_fcat.
DATA: ls_fcat TYPE lvc_s_fcat.
IF it_output1 IS INITIAL.
Check Box
CLEAR ls_fcat.
ls_fcat-fieldname = 'CHK_BOX'.
ls_fcat-datatype = 'CHAR'.
ls_fcat-intlen = '1'.
ls_fcat-edit = kc_x.
ls_fcat-coltext = text-014.
ls_fcat-checkbox = kc_x.
ls_fcat-outputlen = '5'.
APPEND ls_fcat TO pit_fieldcat.
ENDIF. "IF it_output1 IS INITIAL
ID RECH
CLEAR ls_fcat.
ls_fcat-fieldname = 'ID_RECH'.
ls_fcat-outputlen = '10'.
ls_fcat-coltext = text-002.
APPEND ls_fcat TO pit_fieldcat.
BP Reference
CLEAR ls_fcat.
ls_fcat-fieldname = 'BPREFNR'.
ls_fcat-outputlen = '15'.
ls_fcat-coltext = text-003.
APPEND ls_fcat TO pit_fieldcat.
Delivery date
CLEAR ls_fcat.
ls_fcat-fieldname = 'LFDAT'.
ls_fcat-outputlen = '10'.
ls_fcat-coltext = text-004.
APPEND ls_fcat TO pit_fieldcat.
Article
CLEAR ls_fcat.
ls_fcat-fieldname = 'ARTNR_BP'.
ls_fcat-outputlen = '18'.
ls_fcat-coltext = text-005.
APPEND ls_fcat TO pit_fieldcat.
Account Payable invoice
CLEAR ls_fcat.
ls_fcat-fieldname = 'FNUMKRED'.
ls_fcat-outputlen = '16'.
ls_fcat-coltext = text-006.
APPEND ls_fcat TO pit_fieldcat.
Status
CLEAR ls_fcat.
ls_fcat-fieldname = 'STATUS'.
ls_fcat-outputlen = '2'.
ls_fcat-coltext = text-007.
APPEND ls_fcat TO pit_fieldcat.
Create date
CLEAR ls_fcat.
ls_fcat-fieldname = 'ERDAT'.
ls_fcat-outputlen = '10'.
ls_fcat-coltext = text-008.
APPEND ls_fcat TO pit_fieldcat.
Comment
CLEAR ls_fcat.
ls_fcat-fieldname = 'COM_DELFND'.
ls_fcat-outputlen = '25'.
ls_fcat-coltext = text-009.
APPEND ls_fcat TO pit_fieldcat.
Delivery ID
CLEAR ls_fcat.
ls_fcat-fieldname = 'ID_ANLIEF'.
ls_fcat-outputlen = '10'.
ls_fcat-coltext = text-010.
APPEND ls_fcat TO pit_fieldcat.
Company Code
CLEAR ls_fcat.
ls_fcat-fieldname = 'BUKRS'.
ls_fcat-outputlen = '4'.
ls_fcat-coltext = text-011.
APPEND ls_fcat TO pit_fieldcat.
Accounting Document Number
CLEAR ls_fcat.
ls_fcat-fieldname = 'BELNR'.
ls_fcat-outputlen = '10'.
ls_fcat-coltext = text-012.
APPEND ls_fcat TO pit_fieldcat.
Financial Year
CLEAR ls_fcat.
ls_fcat-fieldname = 'GJAHR'.
ls_fcat-outputlen = '4'.
ls_fcat-coltext = text-013.
APPEND ls_fcat TO pit_fieldcat.
ENDFORM. " prepare_field_catalog
*& Form EVENT_TOP_OF_PAGE
TOP-OF-PAGE Preparation
-->z_dyndoc_id Text of TOP-OF-PAGE
FORM event_top_of_page
USING z_dyndoc_id TYPE REF TO cl_dd_document.
DATA : lz_text(255) TYPE c.
System ID
CLEAR : lz_text.
CONCATENATE text-015
sy-sysid
INTO lz_text
SEPARATED BY space.
PERFORM add_text
USING lz_text.
CALL METHOD z_dyndoc_id->new_line.
Title
CLEAR : lz_text.
CONCATENATE text-016
sy-title
INTO lz_text
SEPARATED BY space.
PERFORM add_text
USING lz_text.
CALL METHOD z_dyndoc_id->new_line.
Date
CLEAR : lz_text.
WRITE sy-datum TO lz_text.
CONCATENATE text-017
lz_text
INTO lz_text
SEPARATED BY space.
PERFORM add_text
USING lz_text.
CALL METHOD z_dyndoc_id->new_line.
User ID
CLEAR : lz_text.
CONCATENATE text-018
sy-uname
INTO lz_text
SEPARATED BY space.
PERFORM add_text
USING lz_text.
CALL METHOD z_dyndoc_id->new_line.
Time
CLEAR : lz_text.
WRITE sy-uzeit TO lz_text.
CONCATENATE text-019
lz_text
INTO lz_text
SEPARATED BY space.
PERFORM add_text
USING lz_text.
CALL METHOD z_dyndoc_id->new_line.
Program Name
CLEAR : lz_text.
WRITE sy-repid TO lz_text.
CONCATENATE text-020
lz_text
INTO lz_text
SEPARATED BY space.
PERFORM add_text
USING lz_text.
CALL METHOD z_dyndoc_id->new_line.
Populating data to TOP-OF-PAGE
PERFORM top-of-page.
ENDFORM. " EVENT_TOP_OF_PAGE
*& Form ADD_TEXT
Add Text To TOP-OF-PAGE
FORM add_text
USING p_text TYPE sdydo_text_element.
CALL METHOD z_dyndoc_id->add_text
EXPORTING
text = p_text.
ENDFORM. " ADD_TEXT
*& Form TOP-OF-PAGE
TOP-OF-PAGE
FORM top-of-page.
CALL METHOD z_dyndoc_id->display_document
EXPORTING
reuse_control = kc_x
parent = z_parent_top
EXCEPTIONS
html_display_error = 1.
IF sy-subrc NE 0.
MESSAGE i001(zzrefn01)
WITH text-036 ' '.
ENDIF. "IF sy-subrc NE 0
ENDFORM. "TOP-OF-PAGE
*& Form handle_user_command
Handle the user command
FORM handle_user_command .
DATA lzi_lin TYPE i.
REFRESH ra_id_rech[].
CLEAR ra_id_rech.
ra_id_rech-sign = kc_include.
ra_id_rech-option = kc_equal.
CASE sy-ucomm.
WHEN kc_ucomm-upd.
DESCRIBE LIST NUMBER OF LINES lzi_lin.
DO lzi_lin TIMES.
CLEAR wa_output.
READ LINE sy-index
FIELD VALUE wa_output-chk_box
wa_output-id_rech.
IF sy-subrc NE 0.
EXIT.
ELSE.
IF wa_output-chk_box EQ kc_x.
ra_id_rech-low = wa_output-id_rech.
APPEND ra_id_rech.
ENDIF.
ENDIF.
ENDDO.
IF NOT ra_id_rech IS INITIAL.
SORT ra_id_rech BY low.
DELETE ADJACENT DUPLICATES FROM ra_id_rech
COMPARING low.
IF NOT pa_prodr IS INITIAL.
UPDATE yyeft1200
SET status = kc_status00
WHERE id_rech IN ra_id_rech.
IF sy-subrc EQ 0.
MESSAGE s900(zbcc)
WITH 'Status change successful'(m08)
space
space
space.
ELSE.
MESSAGE i900(zbcc)
WITH 'Status change failed'(m09)
space
space
space.
ENDIF. "IF sy-subrc EQ 0.
ELSE.
MESSAGE i900(zbcc)
WITH 'TEST RUN: NO databases will be changed'(m03)
space
space
space.
ENDIF. "IF NOT pa_prodr IS INITIAL.
ELSE.
MESSAGE i900(zbcc)
WITH 'Atleast one line should be selected'(m01)
'in order to update.'(m02)
space
space.
ENDIF. "IF NOT ra_id_rech IS INITIAL
WHEN kc_ucomm-back
OR kc_ucomm-exit
OR kc_ucomm-cancel.
LEAVE TO SCREEN 0.
WHEN OTHERS.
ENDCASE. "CASE sy-ucomm
ENDFORM. " handle_user_command
*& Form display_selected_data
Display Selected Data
FORM display_selected_data.
LOOP AT it_output
INTO wa_output
WHERE chk_box EQ kc_x.
MOVE-CORRESPONDING wa_output TO wa_output1.
APPEND wa_output1 TO it_output1.
ENDLOOP. "LOOP AT it_output
call dialog screen and display new alv control
IF NOT it_output1[] IS INITIAL.
CALL SCREEN 101 STARTING AT 10 5.
ENDIF. "IF NOT it_output1[] IS INITIAL
ENDFORM. " change_status
iNCLUDE YYEF_CHECK_ISP_I01
*& Include YYEF_CHECK_ISP_I01 *
*& Module USER_COMMAND_0100 INPUT
Handle user command for screen 0100
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN kc_ucomm-back.
LEAVE TO SCREEN 0.
WHEN kc_ucomm-exit.
LEAVE TO SCREEN 0.
ENDCASE. "CASE sy-ucomm.
ENDMODULE. "USER_COMMAND_0100 INPUT
*& Module USER_COMMAND_0101 INPUT
Handle User Command for screen 0101
MODULE user_command_0101 INPUT.
CASE sy-ucomm.
WHEN kc_ucomm-back.
LEAVE TO SCREEN 0.
ENDCASE. "CASE sy-ucomm
ENDMODULE. " USER_COMMAND_0101 INPUT
Include YYEF_CHECK_ISP_O01
*& Include YYEF_CHECK_ISP_O01 *
*& Module PBO OUTPUT
OO ALV Display
MODULE pbo OUTPUT.
CREATE OBJECT z_container
EXPORTING container_name = kc_container.
Create TOP-Document
CREATE OBJECT z_dyndoc_id
EXPORTING style = kc_alv.
Create Splitter for custom_container
CREATE OBJECT z_splitter
EXPORTING parent = z_container
rows = 2
columns = 1.
For TOP-OF-PAGE
CALL METHOD z_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = z_parent_top.
For ALV Display
CALL METHOD z_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = z_parent_grid.
Set height for g_parent_html
CALL METHOD z_splitter->set_row_height
EXPORTING
id = 1
height = 20.
CREATE OBJECT z_grid
EXPORTING i_parent = z_parent_grid.
Set Handler for TOP-OF-PAGE
CREATE OBJECT z_handler.
SET HANDLER z_handler->top_of_page FOR z_grid.
z_repid = sy-repid.
z_variant-report = z_repid.
Display ALV
zs_layout-stylefname = kc_style.
CALL METHOD z_grid->set_table_for_first_display
EXPORTING
is_layout = zs_layout
i_save = kc_u
is_variant = z_variant
CHANGING
it_outtab = it_output[]
it_fieldcatalog = it_fieldcat.
Processing TOP-OF-PAGE Event
CALL METHOD z_grid->list_processing_events
EXPORTING
i_event_name = kc_top
i_dyndoc_id = z_dyndoc_id.
Set handler for ALV Tool Bar
SET HANDLER z_handler->handle_toolbar FOR z_grid.
SET HANDLER z_handler->handle_user_command FOR z_grid.
CALL METHOD z_grid->set_toolbar_interactive.
ENDMODULE. " PBO OUTPUT
*& Module STATUS_0100 OUTPUT
Set the GUI status
MODULE status_0100 OUTPUT.
SET PF-STATUS kc_status.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module STATUS_0101 OUTPUT
Display selected records on screen 0101
MODULE status_0101 OUTPUT.
SET TITLEBAR kc_title.
CREATE OBJECT z_container1
EXPORTING container_name = kc_container1.
CREATE OBJECT z_grid1
EXPORTING i_parent = z_container1.
PERFORM prepare_field_catalog
CHANGING it_fieldcat1.
Display ALV
CALL METHOD z_grid1->set_table_for_first_display
EXPORTING
is_layout = zs_layout
CHANGING
it_outtab = it_output1[]
it_fieldcatalog = it_fieldcat1.
ENDMODULE. " STATUS_0101 OUTPUT
INCLUDE YYEF_CHECK_ISP_TOP
*& Include YYEF_CHECK_ISP_TOP *
DATA DEFINITIONS **
Class declarations *
*class zcl_xyz definition deferred.
CLASS :cl_gui_alv_grid DEFINITION LOAD,
cl_gui_custom_container DEFINITION LOAD.
Tables (old SAP style, please avoid and use workareas instead) *
TABLES: yyeft1200,
yyeft1201.
*tables: xyz.
Controls *
*controls: ctrl_xyz.
Types *
TYPES: BEGIN OF ty_output,
chk_box(1) TYPE c,
celltab TYPE lvc_t_styl,
id_rech TYPE yyeft1200-id_rech,
bprefnr TYPE yyeft1201-bprefnr,
lfdat TYPE yyeft1201-lfdat,
artnr_bp TYPE yyeft1201-artnr_bp,
fnumkred TYPE yyeft1200-fnumkred,
status TYPE yyeft1200-status,
erdat TYPE yyeft1200-erdat,
com_delfnd TYPE char25,
id_anlief TYPE yyeft1008-id_anlief,
bukrs TYPE yyeft1200-bukrs,
belnr TYPE yyeft1200-belnr,
gjahr TYPE yyeft1200-gjahr,
END OF ty_output.
TYPES: BEGIN OF ty_output1,
celltab TYPE lvc_t_styl,
id_rech TYPE yyeft1200-id_rech,
bprefnr TYPE yyeft1201-bprefnr,
lfdat TYPE yyeft1201-lfdat,
artnr_bp TYPE yyeft1201-artnr_bp,
fnumkred TYPE yyeft1200-fnumkred,
status TYPE yyeft1200-status,
erdat TYPE yyeft1200-erdat,
com_delfnd TYPE char25,
id_anlief TYPE yyeft1008-id_anlief,
bukrs TYPE yyeft1200-bukrs,
belnr TYPE yyeft1200-belnr,
gjahr TYPE yyeft1200-gjahr,
END OF ty_output1.
TYPES: BEGIN OF ty_status,
id_rech TYPE yyeft1200-id_rech,
END OF ty_status.
*TYPES-POOLS: xyz.
*TYPES: ty_xyz.
Internal tables *
*DATA: it_xyz.
DATA: it_yyeft1200 TYPE STANDARD TABLE OF yyeft1200,
it_yyeft1201 TYPE SORTED TABLE OF yyeft1201
WITH UNIQUE KEY id_rech posnr,
it_yyeft1008 TYPE STANDARD TABLE OF yyeft1008,
it_output TYPE STANDARD TABLE OF ty_output,
it_output1 TYPE STANDARD TABLE OF ty_output1,
it_fieldcat TYPE lvc_t_fcat,
it_fieldcat1 TYPE lvc_t_fcat.
Workareas *
*DATA: wa_xyz.
DATA: wa_yyeft1200 TYPE yyeft1200,
wa_yyeft1201 TYPE yyeft1201,
wa_yyeft1008 TYPE yyeft1008,
wa_output TYPE ty_output,
wa_output1 TYPE ty_output1.
*****OO ALV DATA DECLARATION
DATA: zs_style TYPE lvc_s_styl,
zs_layout TYPE lvc_s_layo,
z_container TYPE REF TO cl_gui_custom_container,
z_container1 TYPE REF TO cl_gui_custom_container,
z_grid TYPE REF TO cl_gui_alv_grid,
z_grid1 TYPE REF TO cl_gui_alv_grid,
z_dyndoc_id TYPE REF TO cl_dd_document,
z_splitter TYPE REF TO cl_gui_splitter_container,
z_parent_grid TYPE REF TO cl_gui_container,
z_parent_top TYPE REF TO cl_gui_container.
Constants *
*constants: kc_xyz value ... "character
*constants: kn_xyz value ... "numeric
*constants: ki_xyz value ... "integer
*constants: kp_xyz value ... "packed
*constants: kx_xyz value ... "hex
CONSTANTS: kc_status00 TYPE yyeft1200-status VALUE '00',
kc_status10 TYPE yyeft1200-status VALUE '10',
kc_x TYPE char01 VALUE 'X',
kc_include TYPE char01 VALUE 'I',
kc_equal(2) TYPE c VALUE 'EQ',
kc_status(11) TYPE c VALUE 'ZGUI_STATUS',
kc_container TYPE char10 VALUE 'ZCONTAINER',
kc_container1 TYPE char11 VALUE 'ZCONTAINER1',
kc_u TYPE char01 VALUE 'U',
kc_top TYPE char30 VALUE 'TOP_OF_PAGE',
kc_alv TYPE char50 VALUE 'ALV_GRID',
kc_style TYPE char07 VALUE 'CELLTAB',
kc_title TYPE char07 VALUE 'ZTITLE'.
CONSTANTS: BEGIN OF kc_ucomm,
upd TYPE sy-ucomm VALUE 'UPD',
back TYPE sy-ucomm VALUE 'BACK',
exit TYPE sy-ucomm VALUE 'EXIT',
cancel TYPE sy-ucomm VALUE 'CANCEL',
END OF kc_ucomm.
Sentence counters *
*data: cnt_xyz type i value 0.
Calculation variables (Rechenfelder) *
*data: r_xyz.
Switches *
*data: sw_xyz(1) type n value 0.
Misc variables *
*DATA: z_xyz.
*** Initialization of parameters at call of/return to
*** selection dynpro (for Online-only-reports)
DATA: zn_init_seldynp(1) TYPE n
VALUE 1. -
JTable problem plz help me urgent withDefault TableModel
sir
i carefully read the swing tutorial for JTable for the purpose
of rendring specially header rendring.
first u see the code
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import java.util.*;
import javax.swing.table.*;
public class Myscrollpane extends JScrollPane {
ImageIcon icon=new ImageIcon("images/beach1.jpg");
Image img;
int w,h,wi,hi;
TableColumn column = null;
String[] names = {"Company Code", "Company Name"};
DefaultTableModel model=new DefaultTableModel(names,0);
JTable table=new JTable(model);
LogoViewport vp;//user class extends with JViewport
Myscrollpane(int width,int height){
vp= new LogoViewport(width,height);
setOpaque(false);
setMinimumSize(new Dimension(width,height));
setPreferredSize(new Dimension(width,height));
setSize(350,125);
///////////here r the table methods tocontrol /////////////////////
table.setPreferredScrollableViewportSize(new Dimension width,height));
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF );
table.getTableHeader().setReorderingAllowed(false);
table.setBackground(new Color(245,235,237));
table.setForeground(Color.black);
table.setOpaque(true);
table.setEnabled(false);
table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
table.setGridColor(Color.pink);
table.setRowHeight(22);
table.setSelectionBackground(Color.lightGray);
DefaultTableCellRenderer renderer=new DefaultTableCellRenderer();
TableColumn code=table.getColumnModel().getColumn(0);
renderer.setBackground(Color.red);
//if i use the setIcon method then the data comes from the database is
//not shown because the icon paint above the data.Iwant to paint the
//image on the table dynamically means as table populated the image is
//paint on the table means no fix no of rows.How can i
//do.
code.setCellRenderer(renderer);
TableCellRenderer headerRenderer = table.getTableHeade.().getDefaultRenderer();
TableColumn column1=null;
//i use this to change the color and paste icon of header column
//but it is not work
for (int j = 0; j < 2; j++) {
column1 = table.getColumnModel().getColumn(j);
Component comp = headerRenderer.getTableCellRendererComponent(null, column1.getHeaderValue(), false, false, 0, 0);
comp.setBackground(Color.red);
comp.setIcon(new ImageIcon("myimage.gif")); }
//if i use following it also not work
TableCellRenderer headerRenderer = table.getTableHeader().getDefaultRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {((DefaultTableCellRenderer)headerRenderer).setBackground(Color.red);} vp.setView(table);
this.setViewport(vp);
}plz help me with the code.
stated as above i also want to draw the image on the table with the use of DefaultTabel
Model and data set from the data base.Initally no row is shown.
plz help me
thanks in advanceimport java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class TableHeader extends JFrame
public TableHeader()
Object[] columnNames =
new ImageIcon("copy16.gif"),
"Some Text",
new ImageIcon("add16.gif")
// Columns headings are cast to a String when created automatically.
// We want Icons, so use a special renderer and create the columns manually
JTable table = new JTable();
table.getTableHeader().setDefaultRenderer( new HeaderRenderer() );
for (int i = 0; i < columnNames.length; i++)
TableColumn newColumn = new TableColumn(i);
newColumn.setHeaderValue( columnNames[i] );
table.addColumn(newColumn);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
class HeaderRenderer extends DefaultTableCellRenderer
public Component getTableCellRendererComponent(
JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col)
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
setHorizontalAlignment(CENTER);
// color each cell
if (col == 1)
setBackground( Color.yellow );
else
setBackground( Color.green );
// display text or icon
if (value instanceof Icon)
setIcon( (Icon)value );
setText( "" );
else
setIcon( null );
setText((value == null) ? "" : value.toString());
return this;
public static void main(String[] args)
TableHeader frame = new TableHeader();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible(true);
} -
Error while opening a module. plz help me, very urgent.
when i try to open a module, the following error message appears on my screen.
" no j2ee component found in d:\krisp\programs\servlets".
i've installed bea in c: drive and my servlet program is in d: drive.
plz help me, it's very urgent.Can you provide some more information? What were you doing when this happened?
Can you post the entire error message?
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder> go it says this file doesn't exist. can some1 plz help? how can i put all my application through application folder?
Something really odd is going on. In your first screen shot, I noticed that the Applications folder does not have the proper icon displayed in the side bar. Also, in the title bar it lists it as Applications 08-59-29-909.
Not sure where it's picking up that odd name, unless it's because it's still truly within the Trash folder.
Try this. In the Finder > Preferences > General > turn on "Always open folders in a new window". (I have a feeling you have the default setting with this off).
Now, in Finder > Go > move down and open the Applications Folder from there. Now open the folder where you see all your applications that you show in your screen shot, select all, and move them to this true appliactions folder.
This is what you should properly seeing (but with different apps listed):
See how the Applications folder has the icon of the letter A shaped with a pencil, ruler & pen. -
how to select the download location? its automatically downloading to users folder in c drive.. i wanna change to my desktop...plz help me out...
Tools -> Options -> Save files to -> Click browse button and browse for folder where you want to save the file.
-
Hi,
plz tell me the way to print text/data using printer in flex. I tried the FlexPrintJob class. but it takes object of a container to be printed & prints the visible content of that container(along with scrollbars), bt i want to print all contents of the container(including invisible).
I have tried to print bitmap image through FlexPrintJob but it takes lot of time for spooling... So plz help me out in printing(fast with all content) in flash
I am using flex 3 (flex Builder 3 IDE).
Thanks in advance!!!Hi Sagar,
Don't worry You can use the below work around to print all the contents of the Container including the invisible contents under scrolll with out scroll bar..
So what the idea here is we are seeting the container height to full size with out scrolls before sending the container object to printer and as soon as you print the object you are restoring it to the original height with scrolls...so that you can print the full contents without scrolls...
You may have doubt that by chnaging and restoring the size the user may see momentary resize of the container but it is not so as it is a fraction of a second and user cannot notice this change... Give it a try ..I had already run into this problem recently and I have found a work around for this which is as below:
// Here mainContainer is the container or box id the contents of which you want to print
private function doPrintContainer():void
var printJob:FlexPrintJob = new FlexPrintJob();
if(printJob.start() != true) return;
try
var mainContainerHeight:int = mainContainer.height;
//Increasing the height of the desired component to be printed.
mainContainer.height = mainContainer.measuredMinHeight;
mainContainer.verticalScrollPolicy = "off";
//Adding the resized Component to our FlexPrintjob and then sending the print request
printJob.addObject(this,FlexPrintJobScaleType.MATCH_WIDTH);
printJob.send();
//Resizing the component back to normal size
mainContainer.height = mainContainerHeight;
mainContainer.verticalScrollPolicy = "auto";
catch(error:Error)
trace("Error : " + error.message);
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari -
I have an i pod touch 5 and I try to download a new app from the app store so i goto the app store and click download then click it again to install it and it installs but it dont leave an app icon on the home page so i go back to the app store and it says open in a ble box so i click open and it dont open it just keeps saying open and it wont open! please help me!!!!!!!!!!!
I ment blue not ble sorry but plz help!
-
Help my iPod won't let me download apps... I'll put my password in then it takes me to the app but then is just goes away then I do it again an it won't load or it will just go away again plz help I want to get apps
You said you updated yur 1G iPod to 4.2.1. A 1G can only go to 3.1.3 and thus you must have jailbroken it to get to 4.2.1 and that can cause problems.
ArealDJ wrote:
I have the same problem.. apps won't download and won't open. I have a 1st Gen ipod touch and recently upgraded my MacBook Pro (2012) and as soon as I upgraded the iPod Touch to 4.2.1, this happened. I restored to factory defaults and still cannot dl and open apps. Any way to diagnose this problem? Apple tech charges $29.99 for out of warranty products and if I am reluctant to pay with them telling me its simply a hardware problem.
Maybe you are looking for
-
Which approach to use for resizing image
There are two ways of resizing images as I know: 1. image.getScaledInstance(width,height,hint); Using hint like Image.SCALE_AREA_AVERAGING gives somehwat satisfactory resizing. 2. static BufferedImage resize(GraphicsConfiguration gc, BufferedImage so
-
Selective Deletion from Infocube Only (Not from Aggregates)
Hi, For the Selective Deletion, i used the FM 'RSDRD_SEL_DELETION' in program. But this FM deletes the data first from Infocube then from aggregate.Because of this, deletion took more time to delete and adjust the Aggregate. I need an way in which i
-
hi Experts, I have to prepare a reconciliation report but with data from 3 cubes.Can someone tell me the procedure to populate the values from the 3 cubes in different colums, as i will be using a multiprovider and the same characteristics and keyfig
-
What is wrong when clicking on the "+" tab does not create a new tab?
Suddenly, the "+" tab, when clicked on, does nothing. Right-clicking on the "+" and choosing "new tab" fails to function. All 5 boxes under Tools/Options/Tabs are enabled. What do I need to do to re-enable the new tab function?
-
Thunderbolt - FW400 professional audio
Hi, has someone tested a Digidesign digi 002 FW400 audio system with double adapter FW400-FW800 and FW800-Thunderbolt? Thank you