Regarding CVS Diff Display
Hi,
I have to display the CVS Diff in a page where one side of the page will have all the deletions('<' of the Diff) and the other side of the page will have all the additions('>'s of the Diff). Can someone please let me know whether there is an already existing API to do this or if someone has already done this? Please let me know if there is an Eclipse Plugin or any open source code to do this.
Thanks
Hi,
To create pf status goto se41 and create your pf status or from object list of your program by right clicking on your program name create gui_status..
Then within a form endform...write..
*& Form SET_PF_STAT_F14
* text
* --> p1 text
* <-- p2 text
FORM set_standard USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD'. " say standard is the name of your pf-status...maintain in all caps
ENDFORM. " set_pf_status
and pass it...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_STANDARD' " pass the pf-status
In alv it is not required to create one...but as in your case it is not comming try creating one..
Regards
Debarshi
Similar Messages
-
CVS Diff functionality in Java
Hi,
I've got a requirement for an application to implement a functionality same as "CVS diff " functionality . Is there any way to implement it in Java. If its possible then please let me know.
Thnx
Siddhttp://www.jcvs.org/
http://javacvs.netbeans.org/library/
http://www.darwinsys.com/freeware/Diff.java
http://www.google.co.uk/search?hl=en&q=Java+diff
http://www.google.co.uk/search?hl=en&q=Java+cvs&meta=
Hi mlk,
Thanx for the references. Its definitely going to help me in getting a soln for my reqmt.
..Sidd -
Urgent: regarding ALV report display problem
hi,
There are 3 problems:-
1.) I had made a ALV report in which i have to display 'POSTING DATE' (iseg-budat) when we execute the report i.e. it should be displayed as PERIOD :- _______ to _______ on alv report ..
2.)the 2nd problem is dat when i use the ' wa_fieldcat-no_zero = 'X'. It eliminates all the leading zeros which are present which is okay when i it displays material no.. but the problem is dat it also deletes the other fields where the values are to be zeros.
i had used this FM:-
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITS1-MATNR
IMPORTING
OUTPUT = ITS1-MATNR.
so that only matnr field are to be 0's.
3.) I want to delete the rows which use to contain the values 0's as there are no calculations are performing as these are displayed .
ANYbody having solution of this problem ,plzzzz provide the soluion of it as it is most urgent to me and dat person will definately rewarded.
regards,
ric.shi kiran,
thanks for ur response. here is d code which i am using it and plzz help me to figure out where i have to make changes:-
REPORT ZTEST03.
TABLES: ISEG,MARA.
TYPE-POOLS : SLIS.
INTERNAL TABLE FOR INVENTORY STOCK *****************
DATA: BEGIN OF ITS1 OCCURS 0,
MATNR LIKE ISEG-MATNR,
MEINS LIKE ISEG-MEINS,
MENGE LIKE ISEG-MENGE,
WRTZL LIKE ISEG-WRTZL,
BUCHM LIKE ISEG-BUCHM,
WRTBM LIKE ISEG-WRTBM,
WERKS LIKE ISEG-WERKS,
BUDAT LIKE ISEG-BUDAT,
MTART LIKE MARA-MTART,
ITEMDESC LIKE MAKT-MAKTX,
DIFFQTY LIKE ISEG-BUCHM,
DIFFVALUE LIKE ISEG-WRTBM,
END OF ITS1.
data: t_heading type slis_t_listheader.
SELECTION-SCREEN BEGIN OF BLOCK PAR1 WITH FRAME TITLE TEXT-001.
*********PARAMETERS*********
PARAMETERS : PLANT LIKE ISEG-WERKS OBLIGATORY.
*********SELECTION SCREEN OPTIONS*********
SELECT-OPTIONS : R_DATE FOR ISEG-BUDAT,
M_TYPE FOR MARA-MTART,
IT_M FOR MARA-MATNR.
*********DEFINING VARIABLES*********
SELECTION-SCREEN END OF BLOCK par1.
TOP-OF-PAGE.
PERFORM PG_HEADER.
START-OF-SELECTION.
SELECT DISTINCT A~MATNR A~MEINS A~MENGE A~WRTZL A~BUCHM A~WRTBM A~WERKS A~BUDAT B~MTART
FROM ISEG AS A INNER JOIN MARA AS B ON B~MATNR = A~MATNR
INTO CORRESPONDING FIELDS OF TABLE ITS1 WHERE B~MATNR = A~MATNR AND B~MEINS = A~MEINS AND A~WERKS = PLANT AND A~BUDAT IN R_DATE AND B~MTART IN M_TYPE AND B~MATNR IN IT_M.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITS1-MATNR
IMPORTING
OUTPUT = ITS1-MATNR.
SORT ITS1 BY MATNR.
DELETE ADJACENT DUPLICATES FROM ITS1 WHERE MENGE = 0 AND BUCHM = 0.
LOOP AT ITS1.
ITS1-DIFFQTY = ITS1-MENGE - ITS1-BUCHM.
ITS1-DIFFVALUE = ITS1-WRTZL - ITS1-WRTBM.
SELECT SINGLE MAKTX FROM MAKT INTO ITS1-ITEMDESC WHERE MATNR = ITS1-MATNR.
MODIFY ITS1.
ENDLOOP.
PERFORM PRN_SMSTOCK_ALV.
WRITING DATA FROM D TABLES**********
FORM PG_HEADER.
WRITE : 'PHYSICAL INVENTORY AUDIT REPORT PLANT : ', PLANT.
ENDFORM.
*& Form PRN_SMSTOCK_ALV
text
--> p1 text
<-- p2 text
form PRN_SMSTOCK_ALV .
data: w_title type lvc_title,
w_repid type syrepid,
w_comm type slis_formname,
w_status type slis_formname,
x_layout type slis_layout_alv,
t_event type slis_t_event,
t_fieldcat type slis_t_fieldcat_alv,
t_sort type slis_t_sortinfo_alv.
refresh t_fieldcat.
refresh t_event.
refresh t_sort.
clear x_layout.
clear w_title.
perform set_fieldcat2 using:
1 'MTART' 'MTART' 'MARA' '15' space 'MATERIAL TYPE' space space space space space space space space SPACE t_fieldcat 'L' 'C',
2 'MATNR' 'MATNR' 'MARA' '13' space 'MATERIAL NO. ' space space space space space space space space SPACE t_fieldcat 'R' 'C',
3 'ITEMDESC' 'MAKTX' 'MAKT' '25' space 'MATERIAL DESCRIPTION' space space space space space space space space SPACE t_fieldcat 'L' 'C',
4 'MEINS' 'MEINS' 'MARA' '5' space 'UOM' space space space space space space space space SPACE t_fieldcat 'C' 'C',
5 'MENGE' 'MENGE' 'ISEG' '13' space 'ORG.INV.QTY' space space space space space space space space SPACE t_fieldcat 'R' 'C',
6 'WRTZL' 'WRTZL' 'ISEG' '13' space 'ORG.INV.VALUE' space space space space space space space space SPACE t_fieldcat 'R' 'C',
7 'BUCHM' 'BUCHM' 'ISEG' '13' space 'PHY.INV.QTY' space space space space space space space space SPACE t_fieldcat 'R' 'C',
8 'WRTBM' 'WRTBM' 'ISEG' '13' space 'PHY.INV.VALUE' space space space space space space space space SPACE t_fieldcat 'R' 'C',
9 'DIFFQTY' 'MENGE' 'ISEG' '13' space 'DIFF.INV.QTY' space space space space space space space space SPACE t_fieldcat 'R' 'C',
10 'DIFFVALUE' 'WRTZL' 'ISEG' '13' space 'DIFF.INV.VALUE' space space space space space space space space SPACE t_fieldcat SPACE 'P'.
x_layout-zebra = 'X'.
perform set_top_page_heading using t_heading t_event.
perform set_events using t_event.
w_status = ''.
w_repid = sy-repid.
w_comm = 'USER_COMMAND'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = w_repid
it_fieldcat = t_fieldcat
i_Callback_top_of_page = 'Top-of-page'
is_layout = x_layout
it_sort = t_sort
i_callback_pf_status_set = w_status
i_callback_user_command = w_comm
i_save = 'X'
it_events = t_event
i_grid_title = w_title
tables
t_outtab = ITS1
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
ENDFORM.
FORM set_fieldcat2 USING
p_colpos p_fieldname p_ref_fieldname p_ref_tabname
p_outputlen p_noout
p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
p_hotspot p_showasicon p_checkbox p_edit
p_dosum
t_fieldcat TYPE slis_t_fieldcat_alv
P_JUST
P_FTYPE.
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CLEAR wa_fieldcat.
General settings
wa_fieldcat-fieldname = p_fieldname.
wa_fieldcat-no_zero = 'X'.
wa_fieldcat-col_pos = p_colpos.
wa_fieldcat-no_out = p_noout.
wa_fieldcat-hotspot = p_hotspot.
wa_fieldcat-checkbox = p_checkbox.
wa_fieldcat-icon = p_showasicon.
wa_fieldcat-do_sum = p_dosum.
Set output length.
IF NOT p_outputlen IS INITIAL.
wa_fieldcat-outputlen = p_outputlen.
ENDIF.
Set text headers.
IF NOT p_seltext_m IS INITIAL.
wa_fieldcat-seltext_m = p_seltext_m.
ENDIF.
IF NOT p_seltext_l IS INITIAL.
wa_fieldcat-seltext_l = p_seltext_l.
ENDIF.
IF NOT p_seltext_s IS INITIAL.
wa_fieldcat-seltext_s = p_seltext_s.
ENDIF.
IF NOT p_reptext_ddic IS INITIAL.
wa_fieldcat-reptext_ddic = p_reptext_ddic.
ENDIF.
IF NOT p_ddictxt IS INITIAL.
wa_fieldcat-ddictxt = p_ddictxt.
ENDIF.
IF NOT P_JUST IS INITIAL.
WA_FIELDCAT-JUST = P_JUST.
ENDIF.
Set as editable or not.
IF NOT p_edit IS INITIAL.
wa_fieldcat-input = 'X'.
wa_fieldcat-edit = 'X'.
ENDIF.
APPEND wa_fieldcat TO t_fieldcat.
ENDFORM. "set_fieldcat2
======================== Subroutines called by ALV ================
*& Form top_of_page
Called on top_of_page ALV event.
Prints the heading.
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_heading.
ENDFORM.
form set_top_page_heading using t_heading type slis_t_listheader
t_events type slis_t_event.
data: x_heading type slis_listheader,
x_event type line of slis_t_event.
Report title
clear t_heading[].
clear x_heading.
x_heading-typ = 'H'.
x_heading-info = 'PHYSICAL INVENTORY AUDIT REPORT'.
append x_heading to t_heading.
Plant Name
clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'PLANT: '.
x_heading-info = its1-werks.
append x_heading to t_heading.
Posting Date
*clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'POSTING DATE: '.
x_heading-info = ITS1-BUDAT.
append x_heading to t_heading.
Control Date
clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'CONTROL No: '.
x_heading-info = its1-werks.
append x_heading to t_heading.
Control date
clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'CONTROL DATE: '.
x_heading-info = its1-werks.
append x_heading to t_heading.
User who is running the report
clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'User: '.
x_heading-info = sy-uname.
append x_heading to t_heading.
Date of execution
clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'Date: '.
write sy-datum to x_heading-info.
append x_heading to t_heading.
Time of execution
clear x_heading.
x_heading-typ = 'S'.
x_heading-key = 'Time: '.
write sy-uzeit to x_heading-info.
append x_heading to t_heading.
Top of page event
x_event-name = slis_ev_top_of_page.
x_event-form = 'TOP_OF_PAGE'.
append x_event to t_events.
endform.
form set_events using t_events type slis_t_event.
data: x_event type line of slis_t_event.
endform.
plzzz help me out as it is most urgent to me.
regards,
ric.s -
Hi All,
I am catching double click event in user command for alv list display,where we get one structure filled on runtime called slis_selfield upon double clicking on alv rows. in this structure i am not getting the field 'sel_tab_field' filled. and i am in need of that field value.
can you help me out in this regard.
Thanks in advance.
Regards
AshutoshHi ,
FORM user_command USING p_ucomm LIKE sy-ucomm
f_selfield TYPE slis_selfield.
capture double click event on document number created.
CASE p_ucomm.
WHEN '&IC1'.
IF f_selfield-tabname EQ 'I_DOC_CREATED'.
CHECK NOT f_selfield-value IS INITIAL.
SET PARAMETER ID 'BLN' FIELD f_selfield-value.
SET PARAMETER ID 'BUK' FIELD so_bukrs-low.
SET PARAMETER ID 'GJR' FIELD w_gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ELSEIF f_selfield-tabname EQ 'I_ELOG'.
CHECK NOT f_selfield-value IS INITIAL.
SET PARAMETER ID 'BLN' FIELD f_selfield-value.
SET PARAMETER ID 'BUK' FIELD so_bukrs-low.
SET PARAMETER ID 'GJR' FIELD w_gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
I am not getting fieldname field of slis_selfield populated upon double clicking -
Regarding Hierarchial ALV Display
Can any one please tell me the 'keyinfo' parameter in the ALV function REUSE_ALV_HIERSEQ_LIST_DISPLAY.
I want all the details regarding the parameter keyinfo.
Thanks in advance.this is used to specify that according to which field u want hierarchy....
means i want that according to material number i want hierarchical display than i have to pass matnr in this
and
key_info-header01 = 'MAT'.
key_info-item01 = 'MAT'.
In this we passing field name of header table and item table....
Now see this example..
In this i want hierarchy depend on Material and palnt both..
so my code will be
TYPE-POOLS : slis.
TABLES : mseg.
DATA : BEGIN OF itab_head OCCURS 0,
mat LIKE mseg-matnr,
matnr LIKE mseg-matnr,
werks LIKE mseg-werks,
END OF itab_head.
DATA : BEGIN OF itab_item OCCURS 0,
mat LIKE mseg-matnr,
matnr LIKE mseg-matnr,
werks LIKE mseg-werks,
mblnr LIKE mseg-mblnr,
menge LIKE mseg-menge,
END OF itab_item.
DATA : t_fcat TYPE slis_t_fieldcat_alv,
key_info TYPE slis_keyinfo_alv,
t_eve TYPE slis_t_event,
gt_subtot TYPE slis_t_sortinfo_alv,
subtot LIKE LINE OF gt_subtot,
t_listhead TYPE slis_t_listheader,
st_line TYPE slis_listheader.
DATA : t_mtdoc LIKE mseg-mblnr.
SELECT-OPTIONS : mat FOR mseg-matnr.
INITIALIZATION.
PERFORM build_cat USING t_fcat.
PERFORM build_eve.
START-OF-SELECTION.
PERFORM get_data.
PERFORM dis_data.
*& Form build_cat
text
-->TEMP_FCAT text
FORM build_cat USING temp_fcat TYPE slis_t_fieldcat_alv.
DATA : wa_fcat TYPE slis_fieldcat_alv.
wa_fcat-tabname = 'ITAB_HEAD'.
wa_fcat-fieldname = 'MAT'.
wa_fcat-seltext_m = 'Material'.
APPEND wa_fcat TO temp_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'ITAB_HEAD'.
wa_fcat-fieldname = 'WERKS'.
wa_fcat-seltext_m = 'Plant'.
APPEND wa_fcat TO temp_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'ITAB_ITEM'.
wa_fcat-fieldname = 'MBLNR'.
wa_fcat-seltext_m = 'Material Doc.'.
APPEND wa_fcat TO temp_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'ITAB_ITEM'.
wa_fcat-fieldname = 'MENGE'.
wa_fcat-seltext_m = 'Quantity'.
wa_fcat-do_sum = 'Y'.
APPEND wa_fcat TO temp_fcat.
CLEAR wa_fcat.
subtot-spos = 1.
subtot-fieldname = 'MAT'.
subtot-tabname = 'ITAB_HEAD'.
subtot-up = 'X'.
subtot-group = 'X'.
subtot-subtot = 'X'.
subtot-expa = 'X'.
APPEND subtot TO gt_subtot.
ENDFORM. "build_cat
*& Form build_eve
text
FORM build_eve.
DATA : wa_eve TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = t_eve
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "build_eve
*& Form get_data
text
FORM get_data.
SELECT matnr AS mat werks mblnr menge FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab_item
WHERE matnr IN mat.
ENDFORM. "get_data
*& Form dis_data
text
FORM dis_data.
key_info-header01 = 'MAT'.
key_info-item01 = 'MAT'.
key_info-header02 = 'WERKS'.
key_info-item02 = 'WERKS'.
REFRESH itab_head.
LOOP AT itab_item.
ON CHANGE OF itab_item-mat OR itab_item-werks.
MOVE-CORRESPONDING itab_item TO itab_head.
APPEND itab_head.
ENDON.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZALV_PRDS'
it_fieldcat = t_fcat
it_sort = gt_subtot
it_events = t_eve[]
i_tabname_header = 'ITAB_HEAD'
i_tabname_item = 'ITAB_ITEM'
is_keyinfo = key_info
TABLES
t_outtab_header = itab_head
t_outtab_item = itab_item
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "dis_data
reward if usefull..... -
Regarding UCF_AcroForm error displayed when trying to open the pdf form
Hi,
Iam receiving the pop up when trying to open the pdf form.The Error is Server Error Class: UCF_AcroForm Method: Error.The Error displayed in some system and in some other system the form is working fine.The Form is created using the Designer 8.0.The form is working fine in reader 8.0.Is there any problem in the reader version.Is there any solution for this problem please provide.
Thanks and Regards,
SatheshKumar RSathesh,
Similar issue has been reported at SDN so searching would have helped you. See below threads for solutions:-
UCF_AcroForm error
MSS UCF_AcroForm error displayed when trying to display form in PCR
Chintan -
Hi,
When we deploy webdynpro applications in browsers, we get the totel url address in the address bar .But when we deploy it inside portal we get url address only as
http://xxxxxxx/irj/portal .
Why the detail url address is not displayed ?
Thanks a lot .Hi,
The Web Dynpro applicatiolns run inside an iframe, that's why you don't see the detailed url.
If you right click somewhre on the application, you'll see the detailed url.
Regards,
Omri -
Regarding simple reports display
hello all
in a simple report
(1) i want to have the heading ' the employee address ' to be displayed as
the employee
address
i.e. i want to break the header info into two lines .. how can i do this ?
(2) can we add hyperlink to the field dispalayed in the simple report.?
plz help
Thanks inn advance.
nilesh.hi Nilesh,
1. Write two different write statements and make use of UNDER key word to print one below the other...
2. U should use the option HOTSPOT, but you should explain what you exactly need to do.
http://help.sap.com/saphelp_crm50/helpdata/en/7a/504e380745427ee10000009b38f842/content.htm
Regards,
Santosh -
Regarding Authorisation for Display
Hi All,
1.Initially I was unable o navigate o one particular component in Loyalty Frame work and found Basis people giving authorisation based on Component Access ,So given Component name and Inbound Plug name and now I was able to navigate to particular page.
But it is Displaying one error message at the top " you are not authirised to display "
2.Second problem is <,For specific role in Search page when i enter something and click on search it is not giving any result but it is giving for other profiles.
Please help me here about the process how to find out the authorisation object missed for that profile .Try login with the same user in GUI when you get error in webui, execute transactino su53. If it doesn't resolve your issue on system trace using st01 tcode and mark "Authorization check' and in general filters use the user id which you are facing problems and do trace on and repeat your testing and do trace off and check the "Analysis" you may find the missing authorization component in end of the analysis.
Regards,
Kumar -
Hi experts,
I have one ztable having some fields, the end user will not have authorize for (SE11 and SE16) . I want to make program for display that table data. And also want put filter options( Select-options) for all fields, User wants select some fields based on that fields want display all data from that table. How can i do this?
Please help me? Any coding?
Thanks and Regards,
Linganathan.K
Moderator message : Not enough re-search before posting, discussion locked.
Message was edited by: Vinod KumarDear Linganathan,
It is purely based on your requirement.
1. If the users are strictly restricted for SE11 and SE16 then table generator would be a probable option
2. However, when you restrict SE11 and Se16 I do not think so you will give SM30 also...
3. Are you allow user to maintain/edit the table?
3. Do you want to provide selection parameter...
Based on this, probably you should go for a small report program that displays data in the ALV format accepting the input parameters as selection range.
Regards,
Venkat -
Need information regarding Hierarchical ALV display
How to total sub items in an Heirarchical ALV List display?
Hi,
I have one Hierarchical alv example .. please see it. Also check B*ALV in se38.
*& Report ZLAXMI_ALVEXER4 *
REPORT ZLAXMI_ALVEXER4 MESSAGE-ID ZZ .
*& TABLES DECLARATION *
TABLES: VBAK, VBAP.
*& TYPE POOLS DECLARATION *
TYPE-POOLS: SLIS.
DATA DECLARATIONS *
DATA: V_FLAG TYPE C. "Flag to display the header
DATA: V_REPID TYPE SY-REPID.
*& INTERNAL TABLE DECLARATION *
DATA: BEGIN OF IT_VBAK OCCURS 0,
VBELN LIKE VBAK-VBELN,
AUDAT LIKE VBAK-AUDAT,
AUART LIKE VBAK-AUART,
NETWR LIKE VBAK-NETWR,
EXPAND(1),
END OF IT_VBAK.
DATA: BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
PSTYV LIKE VBAP-PSTYV,
CHARG LIKE VBAP-CHARG,
END OF IT_VBAP.
DATA: IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
*events
IT_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE,
V_CALL TYPE C,
X_USER TYPE SLIS_EXIT_BY_USER,
IT_VARIANT LIKE DISVARIANT OCCURS 0 WITH HEADER LINE,
X_KEYINFO TYPE SLIS_KEYINFO_ALV,
*layout
X_LAYOUT TYPE SLIS_LAYOUT_ALV,
*sort
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT LIKE LINE OF IT_SORT,
X_CAT TYPE SLIS_FIELDCAT_ALV,
V_TABIX LIKE SY-TABIX.
Selection screen Declaration
*--BLOCK1
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,
S_AUART FOR VBAK-AUART.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN *
*- Validations
AT SELECTION-SCREEN.
PERFORM VALIDATE_SCREEN.
START OF SELECTION *
START-OF-SELECTION.
*- To get data from VBAK
PERFORM GET_DATA.
*to get data from VBAP
PERFORM GET_DATA_VBAP.
PERFORM PREPARE_ALV.
END OF SELECTION *
END-OF-SELECTION.
PERFORM DISPLAY_REPORT.
*& Form VALIDATE_SCREEN
text
--> p1 text
<-- p2 text
FORM VALIDATE_SCREEN .
DATA: LV_VBELN LIKE VBAK-VBELN,
LV_AUART LIKE VBAK-AUART.
IF NOT S_VBELN[] IS INITIAL.
SELECT VBELN
INTO LV_VBELN
FROM VBAK
WHERE VBELN IN S_VBELN.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'INVALID SALES DOC'(002).
ENDIF.
ENDIF.
IF NOT S_AUART[] IS INITIAL.
SELECT AUART
INTO LV_AUART
FROM VBAK
WHERE AUART IN S_AUART.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'INVALID SALES DOC TYPE'(003).
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_SCREEN
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT VBELN
AUDAT
AUART
NETWR
FROM VBAK
INTO TABLE IT_VBAK
WHERE VBELN IN S_VBELN
AND AUART IN S_AUART.
IF SY-SUBRC = 0.
SORT IT_VBAK BY VBELN.
ENDIF.
ENDFORM. " GET_DATA
*& Form GET_DATA_VBAP
text
--> p1 text
<-- p2 text
FORM GET_DATA_VBAP .
SELECT VBELN
POSNR
MATNR
PSTYV
CHARG
INTO TABLE IT_VBAP
FROM VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN.
IF SY-SUBRC = 0.
SORT IT_VBAP BY VBELN POSNR.
ENDIF.
ENDFORM. " GET_DATA_VBAP
*& Form prepare_alv
text
--> p1 text
<-- p2 text
FORM PREPARE_ALV .
Prepare field catalog .
PERFORM PREPARE_CATALOG.
Modify catalog
PERFORM CHANGE_ATTR_OF_CATALOG.
Modify Layout
PERFORM MODIFY_LAYOUT.
Sort Catalog
PERFORM SORT_CATALOG.
ENDFORM. " prepare_alv
*& Form prepare_catalog
text
--> p1 text
<-- p2 text
FORM PREPARE_CATALOG .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_VBAK'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FLDCAT1[]
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.
APPEND LINES OF IT_FLDCAT1 TO IT_FLDCAT.
CLEAR: IT_FLDCAT1[].
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_VBAP'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FLDCAT1[]
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.
APPEND LINES OF IT_FLDCAT1 TO IT_FLDCAT.
ENDFORM. " prepare_catalog
*& Form change_attr_of_catalog
text
--> p1 text
<-- p2 text
FORM CHANGE_ATTR_OF_CATALOG .
LOOP AT IT_FLDCAT INTO X_CAT.
V_TABIX = SY-TABIX.
CASE X_CAT-FIELDNAME.
WHEN 'EXPAND'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-NO_OUT = 'X'.
ENDIF.
when 'VBELN'.
if x_cat-tabname = 'IT_VBAK'.
x_cat-no_out = 'X'.
endif.
WHEN 'VBELN'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '1'.
X_CAT-SELTEXT_M = 'SALES DOC'.
X_CAT-SELTEXT_L = 'SALES DOC'.
X_CAT-SELTEXT_S = 'SALES DOC'.
X_CAT-OUTPUTLEN = '10'.
ENDIF.
WHEN 'AUDAT'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '2'.
X_CAT-SELTEXT_M = 'DOC DATE'.
X_CAT-SELTEXT_L = 'DOC DATE'.
X_CAT-SELTEXT_S = 'DOC DATE'.
X_CAT-OUTPUTLEN = '8'.
ENDIF.
WHEN 'AUART'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '3'.
X_CAT-SELTEXT_M = 'ORDER REASON'.
X_CAT-SELTEXT_L = 'ORDER REASON'.
X_CAT-SELTEXT_S = 'ORDER REASON'.
X_CAT-OUTPUTLEN = '5'.
ENDIF.
WHEN 'NETWR'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '4'.
X_CAT-SELTEXT_M = 'NET PRICE'.
X_CAT-SELTEXT_L = 'NET PRICE'.
X_CAT-SELTEXT_S = 'NET PRICE'.
X_CAT-OUTPUTLEN = '15'.
ENDIF.
ENDCASE.
MODIFY IT_FLDCAT FROM X_CAT.
CLEAR X_CAT.
ENDLOOP.
ENDFORM. " change_attr_of_catalog
*& Form modify_layout
text
--> p1 text
<-- p2 text
FORM MODIFY_LAYOUT .
X_LAYOUT-DEFAULT_ITEM = 'X'.
X_LAYOUT-ZEBRA = 'X'.
X_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
ENDFORM. " modify_layout
*& Form sort_catalog
text
--> p1 text
<-- p2 text
FORM SORT_CATALOG .
CLEAR WA_SORT.
WA_SORT-SPOS = '01'.
WA_SORT-FIELDNAME = 'VBELN' .
WA_SORT-TABNAME = 'IT_VBAP'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-SPOS = '02'.
WA_SORT-FIELDNAME = 'POSNR' .
WA_SORT-TABNAME = 'IT_VBAP'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
ENDFORM. " sort_catalog
*& Form DISPLAY_REPORT
text
--> p1 text
<-- p2 text
FORM DISPLAY_REPORT .
IT_VARIANT-REPORT = SY-REPID.
SORT IT_VBAK BY VBELN.
SORT IT_VBAP BY VBELN POSNR.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = IT_FLDCAT[]
IT_SORT = IT_SORT
IS_VARIANT = IT_VARIANT
IT_EVENTS = IT_EVENTS[]
I_TABNAME_HEADER = 'IT_VBAK'
I_TABNAME_ITEM = 'IT_VBAP'
IS_KEYINFO = X_KEYINFO
IMPORTING
E_EXIT_CAUSED_BY_CALLER = V_CALL
ES_EXIT_CAUSED_BY_USER = X_USER
TABLES
T_OUTTAB_HEADER = IT_VBAK
T_OUTTAB_ITEM = IT_VBAP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_REPORT
Regards,
Laxmi. -
Help regarding program to display even numbers
plz send me a program to display even numbers from 1 to 100.
DATA : VAL TYPE I.
DO 100 TIMES.
COMPUTE VAL = SY-INDEX MOD 2.
IF VAL EQ 0.
WRITE : / 'Even NOs are' , SY-INDEX.
*ELSE.
*WRITE
ENDIF.
ENDDO.
REGARDS
SHIBA DUTTA -
Regarding Tree structure display in Webdynpro ABAP
Hi Experts,
I am very new to webdynpro ABAP , I was asked to implement some functionalities of RWBE transaction in webdynpro , in RWBE transaction list can be displayed as Tree structure , in webdynpro how i can implement this ? using ALV UI element is it possible . Please help .
Regards,
Ratheesh BSHi ,
I need an output like the below
<material number a1 a2 a3
< plant b1 b2 b3
. org c1 c2 c3
<material number A1 A2 A3
is it possible to show the output as in this format using ALV ?.
I have tried with the help provided by SDN , but not succeed .
also i need to capture double click event and show the currosponding result in a seperate view.
here material number is the parent node , plant and org were child nodes
Regards,
Ratheesh BS
Edited by: Ratheesh Bhaskaran on Oct 7, 2008 4:22 PM
Edited by: Ratheesh Bhaskaran on Oct 7, 2008 4:26 PM
Edited by: Ratheesh Bhaskaran on Oct 7, 2008 4:29 PM -
Problem regarding insert and Display BLOB Image in Tabular form
I am trying to display and insert image in manual tabular form In Oracle APEX. but the image i uploaded was not inserted in wwv_flow_files table and in update button process i got "no data Found" Error...pls someone help me.... some part of code is bellow... SQL CODE IN REPORT REGION OF TABULAR FORM :- {
SELECT '#ROWNUM#' "SNO",
+' <img height="30" width="50" src="#WORKSPACE_IMAGES#'||F.FILE_NAME||'" alt="'||S.stud_fname||'" title="'||S.stud_fname||'" border="1"/>'AS "IMAGES", --- for display image from my table which is loaded through wwv_flow_files+
APEX_ITEM.CHECKBOX(01,s.stud_id) "DELETE",https:
s.stud_id|| apex_item.hidden(02,s.stud_id) "STUD ID",
+.......+
+.......+
union all -- for inserting row
SELECT '#ROWNUM#' "SNO",
+'<input type="file" name="F17" size="5">'AS "IMAGES", -- for display image+
APEX_ITEM.CHECKBOX(01,NULL) "DELETE",
null|| apex_item.hidden(02,null) "STUD ID", }
When i click on UPDATE BUTTON then following PROCESS CODE IS run :
FOR i IN 1..APEX_APPLICATION.G_F02.COUNT LOOP
IF APEX_APPLICATION.G_F02(i)IS NOT NULL THEN
UPDATE STUDENT SET stud_fname=APEX_APPLICATION.G_F04(i),
stud_addr =APEX_APPLICATION.G_F05(i), ......
ELSE
insert into FILE_ATMNT(ATMNT_KEY, ATMNT_NAME, FILE_NAME, MIME_TYPE, ATMNT_SIZE, CNTNT_TYPE, ATMNT_CNTNT, AUDIT_CRT_DATE ) SELECT id, name, filename, mime_type, doc_size,content_type, blob_content, SYSDATE FROM wwv_flow_files WHERE name = APEX_APPLICATION.G_F17(i);
SELECT id into upload_ref from wwv_flow_files where name =APEX_APPLICATION.G_F17(i);
........ ( code for student insert Record )
FILE_ATMNT is my attachment table in my workspace which updated through wwv_flow_files. My problem is that when i was click on update button image is not loaded into "wwv_flow_files" table so i didnt get image name bcz of $ name =APEX_APPLICATION.G_F17(i);$ this. so its show me no data found error.... Pls help meMahesh wrote:
Hi...i am mahesh...Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already).
You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB version and edition
<li>Web server architecture (EPG, OHS or APEX listener)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s)
The best way to get help is to reproduce and share the problem on apex.oracle.com.
All code should be posted wrapped in tags<tt>\...\</tt> tags to preserve formatting and prevent it being interpreted by the forum software.
I am trying to display and insert image in manual tabular form In Oracle APEX. but the image i uploaded was not inserted in wwv_flow_files table and in update button process i got "no data Found" Error...pls someone help me.... some part of code is bellow... CODE IN REPORT REGION OF TABULAR FORM :-
SELECT '#ROWNUM#' "SNO",
'<img height="30" width="50" src="#WORKSPACE_IMAGES#'||F.FILE_NAME||'" alt="'||S.stud_fname||'" title="'||S.stud_fname||'" border="1"/>'AS "IMAGES", --- for display image from my table which is loaded through wwv_flow_files
APEX_ITEM.CHECKBOX(01,s.stud_id) "DELETE",https://forums.oracle.com/forums/post!default.jspa?forumID=137#
s.stud_id|| apex_item.hidden(02,s.stud_id) "STUD ID",
....... (some code).
union all -- for inserting row
SELECT '#ROWNUM#' "SNO",
'<input type="file" name="F17" size="5">'AS "IMAGES", -- for display image
APEX_ITEM.CHECKBOX(01,NULL) "DELETE",
null|| apex_item.hidden(02,null) "STUD ID",
....... (some code )
When i click on UPDATE BUTTON then following PROCESS CODE IS run :
FOR i IN 1..APEX_APPLICATION.G_F02.COUNT LOOP
IF APEX_APPLICATION.G_F02(i)IS NOT NULL THEN
UPDATE STUDENT SET stud_fname=APEX_APPLICATION.G_F04(i),
stud_addr =APEX_APPLICATION.G_F05(i), ..... ( some field of table)..
ELSE
insert into FILE_ATMNT(ATMNT_KEY, ATMNT_NAME, FILE_NAME, MIME_TYPE, ATMNT_SIZE, CNTNT_TYPE, ATMNT_CNTNT, AUDIT_CRT_DATE ) SELECT id, name, filename, mime_type, doc_size,content_type, blob_content, SYSDATE FROM wwv_flow_files WHERE name = APEX_APPLICATION.G_F17(i);
SELECT id into upload_ref from wwv_flow_files where name =APEX_APPLICATION.G_F17(i);
........ ( code for insert command )
FILE_ATMNT is my attachment table in my workspace which updated through wwv_flow_files. My problem is that when i was click on update button image is not loaded into "wwv_flow_files" table so i didnt get image name bcz of $ name =APEX_APPLICATION.G_F17(i);$ this. so its show me no data found error.... Pls help me
Before considering anything else, why bother with all this extra complexity? Why not use the standard form and report pattern? -
Very urgent: regarding problem in display of output
hi,
i am modifying a report in which i have to display the stock date wise, i.e. it will display that the at this date this amount of stock is there.
currently the code is able to display the according to this criteria that if date is <= 15 then it will display the stock of previous month and if it is >= 16 then it will display the stcok of last date of current month.
but i want to display the data in way that it will read the rest of the records from the other itab ITMSEG.
should i display the code of it? that it will display more clear picture.
Edited by: ric .s on Mar 31, 2008 8:23 AMhi,
dis is d 1st part which do the segregation of date:-
parameters: p_date LIKE ZSTOCKSUM-STLDATE default sy-datum.
data: num type i,
w_date type d.
aa = p_date.
num = p_date+6(2).
if num <= 15.
p_date+6(2) = 01.
w_date = p_date - 1.
elseif num => 16.
p_date = p_date + 30.
p_date+6(2) = 01.
w_date = p_date - 1.
endif.
And it the part where it have to fetch the records:-
SELECT ASTLDATE AMATNR AWERKS ALGORT ASTDEBIT ASTCREDIT
BMEINS BMTART BMATKL BNTGEW B~GEWEI
FROM ZSTOCKSUM AS A
INNER JOIN MARA AS B ON AMATNR = BMATNR
INTO TABLE STIT
WHERE AWERKS = P_WERKS AND MTART IN MAT_TYPE AND AMATNR IN P_MATNR AND STLDATE <= P_DATE
AND ( MTART = 'FERT' OR MTART = 'HALB' OR MTART = 'ZBOP' OR MTART = 'ZSCR' OR MTART = 'ROH' )
AND A~LGORT IN P_STLOC.
SELECT BBUDAT AMATNR AWERKS ALGORT AMENGE AMENGE
CMEINS CMTART CMATKL CNTGEW C~GEWEI
FROM MSEG AS A INNER JOIN MKPF AS B ON AMBLNR = BMBLNR AND AMJAHR = BMJAHR
INNER JOIN MARA AS C ON AMATNR = CMATNR
INTO TABLE ITMSEG WHERE AWERKS = P_WERKS AND MTART IN MAT_TYPE AND AMATNR IN P_MATNR AND BUDAT <= P_DATE AND BUDAT => aa
AND ( MTART = 'FERT' OR MTART = 'HALB' OR MTART = 'ZBOP' OR MTART = 'ZSCR' OR MTART = 'ROH' )
AND A~LGORT IN P_STLOC.
SORT ITMSEG BY MATNR WERKS LGORT MEINS MTART MATKL NTGEW GEWEI.
DELETE ADJACENT DUPLICATES FROM ITMSEG COMPARING MATNR WERKS LGORT MEINS MTART MATKL NTGEW GEWEI NTGEW.
INSERT LINES OF ITMSEG INTO TABLE STIT.
ITAB[] = STIT[].
SORT ITAB BY MATNR WERKS LGORT MEINS MTART MATKL NTGEW GEWEI NTGEW.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR WERKS LGORT MEINS MTART MATKL NTGEW GEWEI NTGEW.
SORT STIT BY MATNR LGORT.
SORT ITAB BY MATNR LGORT.
LOOP AT ITAB.
V_QTY = 0.
LOOP AT STIT WHERE MATNR = ITAB-MATNR AND LGORT = ITAB-LGORT.
if num <= 15.
V_QTY = V_QTY + STIT-STDEBIT - STIT-STCREDIT + ITMSEG-MENGE.
*IF AA >= 16.
else.
V_QTY = V_QTY + STIT-STDEBIT - STIT-STCREDIT - ITMSEG-MENGE.
endif.
ENDLOOP.
this is the code where i think the problem is as it is able to display the data in debug mode but when it comes to actual report execution it is not displaying it i.e. if the stcok of material is changed on today's date it is showing but when i want to see the stock of previous date it is still showing the same. plzz help me out it is really urgent.
Edited by: ric .s on Mar 31, 2008 11:06 AM
Maybe you are looking for
-
Loop in motion assistant specified number of times?
I was wondering if in motion assistant I can do a loop in my script so that each movement can be repeated many, many times without having to create a new 'step' for each movement? Any help is appreciated. Thanks, Nichole
-
I created a very small flash swf file. It seems to work fine when tested in flash, and when inserted into Dreamweaver worked originally in Safari and Firefox for Mac, but not at all in IE Windows. Now it won't work at all. I need some help please. Th
-
Why when i open itunes dose its say: error, new itunes library
what i said in the headline
-
PreparedStatement and NVARCHAR
Oracle 8i (8.1.5), jdk 1.2 or jdk 1.1.7b I cannot bind an argument to a PreparedStatement when the column is defined as NVARCHAR. I have used the following: 'select * from cust where lname like ?' and 'select * from cust where lname like N?' lname is
-
Is there any options in Dreamweaver 8 that is capable of auto closing curly braces and parenthesis like I see in a lot of code editors. I'm trying to use the coding environment. Thanks.