Display ALV on click of custom filed in custom project system report
Hi All,
Need your guidence.
I am working on custom project system drill down reports which is created using report painter CJE1/CJE2.
Requirement is to display one custom field in drill down output and on double click event of that custom field , need to display one ALV.
I am able to manage to add new custom field in output but not getting how to handle double click event as no user exit / or BADI getting triggered.
Please let me know is it possible to develop such scenario or not?
Thanks in advance.
Hi Rachna,
First let us know is custom field z? or standard?
if z then for achieving this functionality please search same word key in abap forum as functionality is related to abap.
if standard then share few screenshot what is already exist and what you want to add.
Regards,
Sanjeev
Similar Messages
-
How to create the Custom project System as Web Project
Hi,
I have created a custom project system using this walkthrough. But
this walk through is targeting Visual C# project system. I need to create the Custom project system as Web project and set the start up page as index.html file. How can I achieve this?
Note:
I have got the Custom project system sample from VS2013 SDK samples(https://mpfproj12.codeplex.com/).
But it demonstrate the Custom console applications only.
- Abbas KHi,
So you didn't even follow this walkthrough yet? If you did, how did you do it?
I failed to create such a web project system because I finally messed up my VS experimental instance. But it's possible to create a custom web project system, by following this walkthrough. Someone else has successfully made it, check this
link.
The difference is that you have to use web project type instead of the console application project type. You could copy a web project's .csproj file into the VSPackage project and rename it to xxx.myproj. There's an error in the walkthrough that the AssemblyInfo.cs
file should be put into Properties folder and set the "Build Action" property to Content, "Include in VSIX" to true.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Modifying project properties of custom project system
I have tried to create a custom project system by walk through https://msdn.microsoft.com/en-us/library/vstudio/cc512961.aspx and succeeded. And now I want to modify the project properties of this created project system. The second part of this walk
through is guiding to create property pages for solution properties. (Solution Explorer-> Right Click on Solution and select Properties) I don't want to modify solution properties, I need to customize project properties (Solution Explorer-> Right Click
on Project and select Properties) by adding new tabs and other items for my custom project system. Please help me as soon as possible.Hello,
you can't customize the project properties in VS (for any version), you have 2 solutions :
1- You must develop addin for visual studio
From MSDN :>
https://msdn.microsoft.com/en-us/library/80493a3w.aspx
https://msdn.microsoft.com/en-us/library/5abkeks7.aspx
From code project (3 Tutorials) :>
http://www.codeproject.com/Articles/292073/Extending-Visual-Studio-Part-1-Creating-Code-Snipp
http://www.codeproject.com/Articles/324611/Extending-Visual-Studio-Part-Creating-Addins
http://www.codeproject.com/Articles/365680/Extending-Visual-Studio-Part-3-Item-Templates
2- you can customize projefct properties from project file, in the links below you find how to create and customize project file :
https://msdn.microsoft.com/en-us/library/cc175544(v=vs.90).aspx
http://www.codeproject.com/Articles/27931/Customizing-csproj-files-to-autogenerate-AssemblyI
http://www.codeproject.com/Articles/31257/Custom-Tools-Explained -
PS: Custom Project Detail report, budget, actual, variance etc
Hi All.
I am implementing a report that needs to display the project, all the WBS's and the activity (if there is one linked to a network which in turn linked to a WBS) on a report. The report columns include budget, planned cost,
actual cost and other fields that I can calculate if
I have the first three fields.
Does anybody know which tables I can use to get the
planned and actual costs associated with a project.
The structure of a project looks something like this:
Proj
->WBS
->Network
->Activity.
The costs are normally associated with the activity, and it "rolls" up to Proj level?
I have already found the budget values in table BPGE for
each WBS.
Another related question:
How does the activity link up with the project-
what tables can I use and how does it relate to table
PROJ or PRPS?
I appreciate any help.
Thank you
RynoTry:
* Costs
call function 'K_DATE_TO_PERIOD_CONVERT'
exporting
i_date = sy-datum
i_kokrs = 'ZZZZ'
importing
e_gjahr = cur_year.
select *
from pmco
into table pmco_int
where objnr = objnr
and cocur = 'USD'
and beltp in (1, 2)
and wrttp in ('01', '04')
and gjahr = cur_year.
clear: est_cost,
act_cost,
est_rev,
act_rev.
loop at pmco_int.
do varying sav_tot
from pmco_int-wrt01
next pmco_int-wrt02.
if sy-index > 12.
exit.
endif.
if pmco_int-beltp = '1'.
if pmco_int-wrttp = '04'.
act_cost_p = act_cost_p + sav_tot.
else.
est_cost_p = est_cost_p + sav_tot.
endif.
else.
if pmco_int-wrttp = '04'.
act_rev_p = act_rev_p + sav_tot.
else.
est_rev_p = est_rev_p + sav_tot.
endif.
endif.
enddo.
endloop.
write act_cost_p to act_cost_c.
translate act_cost_c using ', '.
condense act_cost_c no-gaps.
move act_cost_c to act_cost.
shift act_cost right deleting trailing space.
write est_cost_p to est_cost_c.
translate est_cost_c using ', '.
condense est_cost_c no-gaps.
move est_cost_c to est_cost.
shift est_cost right deleting trailing space.
write act_rev_p to act_rev_c.
translate act_rev_c using ', '.
condense act_rev_c no-gaps.
move act_rev_c to act_rev.
shift act_rev right deleting trailing space.
write est_rev_p to est_rev_c.
translate est_rev_c using ', '.
condense est_rev_c no-gaps.
move est_rev_c to est_rev.
shift est_rev right deleting trailing space.
Rob -
How to display records when clicking button in alv
I am using screen painter to create two buttons
'classical' and 'alv'.
When i click the first button control should move to
corresponding classical program.Evan i got the answer
I am not able to display the "select-options button" in the
output as in classical report program.
It displays all records instead of selecting particular records from select-option button.
So how to display the select option button(i.e in the classical view program) while "clicking the classical button " .
plz send me the coding....hi,
try this.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
VBELN FOR V_VBELN MODIF ID G2.
SELECTION-SCREEN END OF SCREEN 100 .
PAI.
module mod_name.
case sy-ucomm.
when 'BUTT!'.
call selection-screen 100.
when 'BUTT2'.
""""your ALV logic"""".
endcase.
endmodule.
if...any doubts revert back.
Regards
Sandeep Reddy -
hallow
i wont to use the event double click on my alv .
when i push on one field like org. unit iwont to open a list of all unit below .
please if some that now this evanet can help and explain that in sample becouse i never use that (evant or metod)
regardsHi,
REPORT Ztest_ALV
NO STANDARD PAGE HEADING
LINE-SIZE 180
MESSAGE-ID /EMN/SD.
*class lcl_event_receiver definition deferred.
T A B L E S *
TABLES : /EMN/DMS_DTLS. "DMS Details
Class Declarations
CLASS LCL_EVENT_RECEIVER DEFINITION DEFERRED.
T Y P E D E C L A R A T I O N S *
Types for Selection Data
TYPES : BEGIN OF T_CHKINFO,
BELNR TYPE /EMN/DMS_DTLS-BELNR, "Invoice
YCHKNO TYPE /EMN/DMS_DTLS-YCHKNO, "Check no
YCHKDT TYPE /EMN/DMS_DTLS-YCHKDT, "Check Date
YCHKAM TYPE /EMN/DMS_DTLS-YCHKAM, "Check Amount
YAENAM TYPE /EMN/DMS_DTLS-YAENAM, "User ID
END OF T_CHKINFO.
Types for User Data
TYPES : BEGIN OF T_USR21,
BNAME TYPE USR21-BNAME, "User Name in User Master Record
PERSNUMBER TYPE USR21-PERSNUMBER, "Person number
END OF T_USR21.
Types for User Name Details
TYPES : BEGIN OF T_ADRP,
PERSNUMBER TYPE /EMN/DMS_DTLS-YCHKNO, "Person number
NAME_FIRST TYPE ADRP-NAME_FIRST, "First name
NAME_LAST TYPE ADRP-NAME_LAST, "Last name
END OF T_ADRP.
Types for ALV List
TYPES : BEGIN OF T_FINAL,
BELNR TYPE /EMN/DMS_DTLS-BELNR, "Invoice
YCHKNO TYPE /EMN/DMS_DTLS-YCHKNO, "Check no
YCHKDT TYPE /EMN/DMS_DTLS-YCHKDT, "Check Date
YCHKAM TYPE /EMN/DMS_DTLS-YCHKAM, "Check Amount
YAENAM TYPE /EMN/DMS_DTLS-YAENAM, "User ID
NAME_FIRST TYPE ADRP-NAME_FIRST, "First name
NAME_LAST TYPE ADRP-NAME_LAST, "Last name
END OF T_FINAL.
I N T E R N A L T A B L E D E C L A R A T I O N S
DATA: WA_FINAL TYPE T_FINAL.
DATA : DT_CHKINFO TYPE STANDARD TABLE OF T_CHKINFO WITH HEADER LINE ,
DT_USR21 TYPE STANDARD TABLE OF T_USR21,
DT_ADRP TYPE STANDARD TABLE OF T_ADRP,
DT_FINAL TYPE STANDARD TABLE OF T_FINAL WITH HEADER LINE,
ALV Internal tables (Standard Internal Tables)
Catalog of fields for ALV
DT_FIELDCAT TYPE LVC_T_FCAT,
Internal table of alv sort
DT_SORT TYPE LVC_T_SORT.
D A T A D E C L A R A T I O N S
DATA: DG_TABIX TYPE SY-TABIX,
DG_COL_POS TYPE I, " Column
DG_ROW_POS TYPE I, " Row
DG_DATE1(10), " Date
DG_EXIT(1) TYPE C, " Exit for no data
DG_GRID TYPE REF TO CL_GUI_ALV_GRID, " Grid Control
DG_TXT(255) TYPE C, " Text
DG_TIME(8), " Time
DG_DATE(10), " Date
DG_SUBJECT TYPE SIN_OBJ_DE, " Subject for Mail
DG_REASON TYPE SIN_OBJ_DE, " Reason
DG_CONTAINER TYPE SCRFNAME VALUE 'MODIFYDATEPROG',
" Container Name
DG_CUSTOM_CONTAINER TYPE REF
TO CL_GUI_CUSTOM_CONTAINER, " Custom Cont.
DG_SPLITTER TYPE REF
TO CL_GUI_SPLITTER_CONTAINER, " Splitter Cont.
DG_CONTAINER_1 TYPE REF TO CL_GUI_CONTAINER, " container 1
DG_CONTAINER_2 TYPE REF TO CL_GUI_CONTAINER, " container 2
DG_OK_CODE LIKE SY-UCOMM, " OK Code
DG_LOGO TYPE REF TO CL_DD_AREA, " Print logo
DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT, " Text
DG_REPID TYPE SY-REPID, " Program Name
EVENT_RECEIVER TYPE REF TO LCL_EVENT_RECEIVER.
S T R U C T U R E D E C L A R A T I O N S
ALV List workareas
*Structure for Field catalog
DATA: DS_FIELDCAT_LN LIKE LINE OF DT_FIELDCAT,
Structure for ALV Grid layout properties
DS_LAYOUT TYPE LVC_S_LAYO,
Structure for alv sort
DS_SORT TYPE LVC_S_SORT.
C O N S T A N T D E C L A R A T I O N S
CONSTANTS: C_X(1) TYPE C VALUE 'X'. " Value X
I N P U T S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001."Selection
SELECT-OPTIONS : S_BELNR FOR /EMN/DMS_DTLS-BELNR, "Invoice no
S_YCHKDT FOR /EMN/DMS_DTLS-YCHKDT, "Check Date
S_YAENAM FOR /EMN/DMS_DTLS-YAENAM. "User ID
SELECTION-SCREEN END OF BLOCK B1.
CLASS DEFINITION
CLASS LCL_EVENT_RECEIVER DEFINITION.
PUBLIC SECTION.
METHODS:
GET_DATA ,
HANDLE_ROW_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
DISPLAY_LIST.
ENDCLASS. "lcl_event_receiver DEFINITION
CLASS IMPLEMENTATION
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
METHOD GET_DATA.
CLEAR DG_REPID.
DG_REPID = SY-REPID.
PERFORM GET_DATA.
ENDMETHOD. "GET_DATA
METHOD HANDLE_ROW_CLICK.
READ TABLE DT_FINAL INTO WA_FINAL INDEX E_ROW_ID.
IF SY-SUBRC = 0.
EXPORT WA_FINAL FROM WA_FINAL TO MEMORY ID 'ZCHK'.
CALL TRANSACTION 'YDMSCHKINFO'.
ENDIF.
ENDMETHOD. "handle_row_click
METHOD DISPLAY_LIST.
IF DT_FINAL[] IS NOT INITIAL.
Display ALV Grid List
PERFORM DISPLAY_LIST.
ENDIF.
ENDMETHOD. "DISPLAY_LIST
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
S T A R T O F S E L E C T I O N
START-OF-SELECTION.
Create object for Check Data
CREATE OBJECT EVENT_RECEIVER.
CALL METHOD EVENT_RECEIVER->GET_DATA.
E N D O F S E L E C T I O N
END-OF-SELECTION.
Display ALV GRID Report
CALL METHOD EVENT_RECEIVER->DISPLAY_LIST.
*& Form GET_DATA
Perform to Get Data
FORM GET_DATA .
DATA: WA_USR21 TYPE T_USR21,
WA_ADRP TYPE T_ADRP,
WA_CHKINFO TYPE T_CHKINFO.
CLEAR :DT_CHKINFO,DT_CHKINFO[].
Fetch the Check Info from /EMN/DMS_DTLS
SELECT BELNR
YCHKNO
YCHKDT
YCHKAM
YAENAM
FROM /EMN/DMS_DTLS
INTO TABLE DT_CHKINFO
WHERE BELNR IN S_BELNR
AND YCHKDT IN S_YCHKDT
AND YAENAM IN S_YAENAM.
IF SY-SUBRC = 0.
SORT DT_CHKINFO BY BELNR YAENAM.
Fetch the User Data from USR21
SELECT BNAME
PERSNUMBER
FROM USR21
INTO TABLE DT_USR21
FOR ALL ENTRIES IN DT_CHKINFO
WHERE BNAME = DT_CHKINFO-YAENAM.
IF SY-SUBRC = 0.
SORT DT_USR21 BY BNAME.
Fetch the User Name Details from ADRP
SELECT PERSNUMBER
NAME_FIRST
NAME_LAST
FROM ADRP
INTO TABLE DT_ADRP
FOR ALL ENTRIES IN DT_USR21
WHERE PERSNUMBER = DT_USR21-PERSNUMBER.
IF SY-SUBRC = 0.
LOOP AT DT_CHKINFO INTO WA_CHKINFO..
WA_FINAL-BELNR = WA_CHKINFO-BELNR.
WA_FINAL-YCHKNO = WA_CHKINFO-YCHKNO.
WA_FINAL-YCHKDT = WA_CHKINFO-YCHKDT.
WA_FINAL-YCHKAM = WA_CHKINFO-YCHKAM.
WA_FINAL-YAENAM = WA_CHKINFO-YAENAM.
READ TABLE DT_USR21 INTO WA_USR21 WITH KEY BNAME = WA_CHKINFO-YAENAM.
CLEAR WA_CHKINFO.
IF SY-SUBRC = 0.
READ TABLE DT_ADRP INTO WA_ADRP WITH KEY PERSNUMBER = WA_USR21-PERSNUMBER.
CLEAR WA_USR21.
IF SY-SUBRC = 0.
WA_FINAL-NAME_FIRST = WA_ADRP-NAME_FIRST.
WA_FINAL-NAME_LAST = WA_ADRP-NAME_LAST.
CLEAR WA_ADRP.
ENDIF.
ENDIF.
APPEND WA_FINAL TO DT_FINAL.
CLEAR WA_FINAL.
ENDLOOP.
ENDIF.
ENDIF.
ELSE.
MESSAGE I000 WITH 'No Data Found for Given criteria'.
ENDIF.
ENDFORM. " GET_DATA
*& Form display_list
Perform to Display the Data
FORM DISPLAY_LIST .
Build catalog and assign layout settings
PERFORM BUILD_HEADER.
Display ALV Grid List in screen 100 for Grid Control
CALL SCREEN 100.
ENDFORM. " display_list
*& Form build_header
Perform to Build the Heading for the Report
FORM BUILD_HEADER .
Field catalog
REFRESH DT_FIELDCAT.
Invoice Number
ADD 1 TO DG_ROW_POS.
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'BELNR'.
DS_FIELDCAT_LN-INTTYPE = 'C'.
DS_FIELDCAT_LN-OUTPUTLEN = '12'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'Invoice Number'.
DS_FIELDCAT_LN-SCRTEXT_M = 'Invoice Number'.
DS_FIELDCAT_LN-HOTSPOT = C_X.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
Check No
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'YCHKNO'.
DS_FIELDCAT_LN-INTTYPE = 'C'.
DS_FIELDCAT_LN-OUTPUTLEN = '10'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'Check No '.
DS_FIELDCAT_LN-SCRTEXT_M = 'Check No '.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
Check Date
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'YCHKDT'.
DS_FIELDCAT_LN-INTTYPE = 'D'.
DS_FIELDCAT_LN-OUTPUTLEN = '10'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'Check Date'.
DS_FIELDCAT_LN-SCRTEXT_M = 'Check Date'.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
*Check Amount
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'YCHKAM'.
DS_FIELDCAT_LN-INTTYPE = 'C'.
DS_FIELDCAT_LN-OUTPUTLEN = '14'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'Check Amount'.
DS_FIELDCAT_LN-SCRTEXT_M = 'Check Amount'.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
User ID
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'YAENAM'.
DS_FIELDCAT_LN-INTTYPE = 'C'.
DS_FIELDCAT_LN-OUTPUTLEN = '12'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'User ID'.
DS_FIELDCAT_LN-SCRTEXT_M = 'User ID'.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
User First Name
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'NAME_FIRST'.
DS_FIELDCAT_LN-INTTYPE = 'C'.
DS_FIELDCAT_LN-OUTPUTLEN = '25'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'First Name'.
DS_FIELDCAT_LN-SCRTEXT_M = 'First Name'.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
User Last Name
ADD 1 TO DG_COL_POS.
CLEAR DS_FIELDCAT_LN.
DS_FIELDCAT_LN-FIELDNAME = 'NAME_LAST'.
DS_FIELDCAT_LN-INTTYPE = 'C'.
DS_FIELDCAT_LN-OUTPUTLEN = '25'.
DS_FIELDCAT_LN-ROW_POS = DG_ROW_POS. " Position in row
DS_FIELDCAT_LN-COL_POS = DG_COL_POS. " Position in column
DS_FIELDCAT_LN-SELTEXT = 'Last Name'.
DS_FIELDCAT_LN-SCRTEXT_M = 'Last Name'.
APPEND DS_FIELDCAT_LN TO DT_FIELDCAT.
ENDFORM. " build_header
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
Set PF Status
SET PF-STATUS 'ZCHK'.
SET TITLEBAR 'ZTITLE'.
WRITE SY-UZEIT TO DG_TIME. " Time
WRITE SY-DATUM TO DG_DATE. " Date
ALV Layout
CLEAR DS_LAYOUT.
DS_LAYOUT-CWIDTH_OPT = C_X.
Create a custom container object
IF DG_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT DG_CUSTOM_CONTAINER
EXPORTING
CONTAINER_NAME = DG_CONTAINER
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 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.
Create Splitter container object in custom container
CREATE OBJECT DG_SPLITTER
EXPORTING
PARENT = DG_CUSTOM_CONTAINER
ROWS = 2
COLUMNS = 1
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 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.
Assigning container 1 to splitter container
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = DG_CONTAINER_1.
Assigning height to row
CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
EXPORTING
ID = '1'
HEIGHT = 24
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 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.
Create Document object
CREATE OBJECT DG_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'DMS Check Info Report'
SAP_STYLE = CL_DD_AREA=>HEADING.
Add Line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'Invoice no'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
Add Text for :
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = ':'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP
EXPORTING
WIDTH = 2.
Add Text for Heading
IF S_BELNR-LOW IS NOT INITIAL.
WRITE S_BELNR-LOW TO DG_TXT.
ELSE.
CLEAR DG_TXT.
ENDIF.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = DG_TXT.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
if S_BELNR-low is not initial or S_BELNR-HIGH is not initial.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'To'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
endif.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
Add Text for Heading
IF S_BELNR-HIGH IS NOT INITIAL.
WRITE S_BELNR-HIGH TO DG_TXT.
ELSE.
CLEAR DG_TXT.
ENDIF.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = DG_TXT.
Add Line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
Add Line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'Chk Date'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
Add Text for :
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = ':'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP
EXPORTING
WIDTH = 2.
Add Text for Heading
IF S_YCHKDT-LOW IS NOT INITIAL.
WRITE S_YCHKDT-LOW TO DG_TXT MM/DD/YYYY.
ELSE.
CLEAR DG_TXT.
ENDIF.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = DG_TXT.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
if S_YCHKDT-LOW is not initial or S_YCHKDT-HIGH is not initial.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'To'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
endif.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
Add Text for Heading
IF S_YCHKDT-HIGH IS NOT INITIAL.
WRITE S_YCHKDT-HIGH TO DG_TXT MM/DD/YYYY.
ELSE.
CLEAR DG_TXT.
ENDIF.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = DG_TXT.
Add Line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
Add Line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'User ID'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
Add Text for :
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = ':'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP
EXPORTING
WIDTH = 2.
Add Text for Heading
IF S_YAENAM-LOW IS NOT INITIAL.
WRITE S_YAENAM-LOW TO DG_TXT.
ELSE.
CLEAR DG_TXT.
ENDIF.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = DG_TXT.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
if S_YAENAM-LOW is not initial or S_YAENAM-HIGH is not initial.
Add Text for Heading
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'To'
SAP_EMPHASIS = CL_DD_AREA=>STRONG.
endif.
Add Gap for Text
CALL METHOD DG_DYNDOC_ID->ADD_GAP.
Add Text for Heading
IF S_YAENAM-HIGH IS NOT INITIAL.
WRITE S_YAENAM-HIGH TO DG_TXT.
ELSE.
CLEAR DG_TXT.
ENDIF.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = DG_TXT.
Add Logo
CALL METHOD DG_DYNDOC_ID->VERTICAL_SPLIT
EXPORTING
SPLIT_AREA = DG_DYNDOC_ID
SPLIT_WIDTH = '82%'
IMPORTING
RIGHT_AREA = DG_LOGO
EXCEPTIONS
INVALID_SPLIT_AREA = 1
SPLIT_AREA_EQ_RIGHT_AREA = 2
RIGHT_AREA_ALREADY_USED = 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.
CALL METHOD DG_LOGO->ADD_PICTURE
EXPORTING
PICTURE_ID = '/EMN/EASTMAN_LOGO'.
CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
Display Heading document & Logo in container 1
CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
EXPORTING
REUSE_CONTROL = C_X
PARENT = DG_CONTAINER_1
EXCEPTIONS
HTML_DISPLAY_ERROR = 1.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Assigning container 2 in splitter container
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = DG_CONTAINER_2.
Display GRID control in container 2
CREATE OBJECT DG_GRID
EXPORTING
I_PARENT = DG_CONTAINER_2
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 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.
DS_SORT-FIELDNAME = 'BELNR'.
ds_sort-group = 'X'.
APPEND DS_SORT TO DT_SORT.
CLEAR DS_SORT.
Display the ALV Grid Control in Report
CALL METHOD DG_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE = C_X
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT = DS_LAYOUT
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = DT_FINAL[]
IT_FIELDCATALOG = DT_FIELDCAT[]
IT_SORT = DT_SORT[]
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2.
IF SY-SUBRC <> 0.
MESSAGE I000 WITH
'Error in calling SET_TABLE_FOR_FIRST_DISPLAY'.
ENDIF.
Call "set_focus" if you want to make sure that 'the cursor'
is active in your control
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = DG_GRID
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 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.
CREATE OBJECT EVENT_RECEIVER.
SET HANDLER EVENT_RECEIVER->HANDLE_ROW_CLICK FOR DG_GRID.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
Process After Input
MODULE USER_COMMAND_0100 INPUT.
Send the methods from presentation server
CALL METHOD CL_GUI_CFW=>DISPATCH.
CASE SY-UCOMM.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 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.
Leave to selection screen
LEAVE TO SCREEN 0.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR DG_OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Regards,
Sreevani -
Regarding ALV double click and error
hello all ,
suppose you have error in your report at particular line no. you are displaying that line no. in alv now if you double click on line no in alv ,it will open that report in se38 with cursor postion at that line no contain error.i think there should be FM but i donot know its name.
its urgent.
plz help me.
thanks in advance.I have an alv which has two column one is reort name and 2nd is for error (conatin line no where is error) that reort conatain.
now i duble click on error column it should open that report in se38 and cursor should be at that line no.
e.g. i have zsales report which has an error on line no.'11' .
when i double click on line no 11.report zsales should be open in se38 with cursor postion at 11th line no in report.
thanks -
Displaying ALV as in standard Tcode FBL5N
Hi Experts,
My requirement is to display ALV list sorted on company code, Customer number and currency fields. Then it should be subtotaled based on the currency field and sum up payment amount field as displayed in standard transaction FBL5N.
I have done till this part by making the it_sort-subtotal field = 'X' In currency field. And field fieldcat-do_sum = 'X' on Payment amount field.
Now the ALV list should display separate totals for each currency after every customer. Then the grand total for every currency after every company code for all the customers in that company code. And in the end of ALV grand total should be displayed based on adding all the subtotals for each currency.
For example :
COMPANY CODE || CUSTOMER || PAYMENT AMOUNT || CURRENCY
2030 || 6 || 5.00 || USD
2030 || 6 || 1.00 || USD
TOTAL 6.00 USD
2030 || 6 || 4.00 || SGD
|| 6 || 3.00 || SGD
TOTAL 7.00 SGD
6 USD
7 SGD
2030 || 6318 || 1.00 || NZD
2030 || 6318 || 2.00 || NZD
TOTAL 3.00 NZD
2030 || 6318 || 4.00 || USD
2030 || 6318 || 1.00 || USD
TOTAL 5.00 USD
3.00 NZD
5.00 USD
============================================================
11.00 USD
7.00 SGD
3.00 NZD
I Hope I made myself clear. Please help on the issue.
Edited by: Sunanda05 on Apr 13, 2011 9:08 AM
Edited by: Sunanda05 on Apr 13, 2011 9:14 AM
Edited by: Sunanda05 on Apr 13, 2011 10:08 AMNote Still Valid in Market place.
"SAP Note 1111155 - FSCM-DM: Termination "Open SQL
statement is too large."
Note Language: English Version: 10 Validity: Valid Since 07-28-2010
Summary
Symptom
When you access dispute case using the integration (creating dispute case
using FI transactions (for example, FBL5N), clearing items to which dispute
case have been assigned), the system issues the dump "Open SQL statement is
too large".
The error occurs if there are many (more than 1000) dispute cases for a
customer.
Other terms
FBL5N, FBZ1, F-32, integration
Reason and Prerequisites
This problem is due to a very large dispute case volume.
Solution
Import the relevant Support Package or implement the attached correction
instructions.
Header Data
Release Status: Released for Customer
Released on: 07-28-2010 08:02:45
Master Language: German
Priority: Correction with medium priority
Category: Program error
Primary Component: FIN-FSCM-DM Dispute Management
Valid Releases
Software Component Release From
Release
To
Release
and
Subsequent
SAP_APPL 600 600 600
SAP_APPL 602 602 602
SAP_APPL 603 603 603
SAP_APPL 604 604 604
SAP_APPL 605 605 605
PI 2004.1 2004_1_47" -
Flush displayed ALV and display normal posting messages on same screen
Hi,
I have a requirement wherein i have displayed ALV with execute button on same screen with FI data displayed in ALV.
Now when user select one particular row and excute it , the requirement is to flush that ALV displayed and display normal
message such as POSTING DONE
How can i achieve it ? I am using REUSE_ALV_LISTWhat do you mean by "Now when user select one particular row and excute it "???
Meaning you do some event like double clicking on that particular row or after selecting it, you will trigger some button?
For 1st condition, make sure you've created an ALV event.
If 2nd one, either you create/modify the ALV toolbar.
Then you can do a simple call screen to exit from that ALV. Or a simple pop up message. -
Issue with displaying ALV in a popup window
Hi Experts,
I am trying to create an popup window with an ALV in it. TO display the ALV i have defined the component usage for SALV_WD_TABLE component.When the ALV is displayed for the first time it shows up correctly with required data. When i try to display ALV popup again only the popup window frame gets displayed the ALV is missing from the popup window.
If i refresh the main component by clicking browser refresh buttion and then click for ALV popup dsplay i get the correct popup display the first time and then agin the same issue.
Has anyone else come across this issue before. All your suggestions, responses are welcome.
Thanks,
VivekHI,
My popup window has only one embedded view, the TABLE view of used component SALV_WD_TABLE hence i cannot modify the TABLE view.
I tired putting the following code for context node initialization in both the the methods WDDOONOPEN and WDDOINIT of the window which has the embedded view. But it dosen't make any difference i face the same issue even with these changes.
types: begin of ty_belnr,
belnr type vbkpf-belnr,
end of ty_belnr.
data: lt_belnr type standard table of ty_belnr,
lo_node type ref to if_wd_context_node,
lo_element type ref to if_wd_context_element.
select belnr
from vbkpf
into table lt_belnr
where ausbk = 'UC'
and bukrs = 'UC'
and gjahr = '2011'
and usnam = sy-uname.
if sy-subrc eq 0.
lo_node = wd_context->get_child_node( 'DOC_NUMBERS').
lo_node->bind_elements( new_items = lt_belnr[] ).
endif.
Edited by: Vivek Priyadarshi on Sep 14, 2010 5:24 PM -
Display alv grids in selection screen based on the user event
Hi All,
I am workign on displaying ALV in same selection screen.I am able to display the ALV in selection screen.
But i have 2 buttons in my selection screen 'Create' and 'change'.
When i click on create i need with some type of data and when i click on 'change' my alv grid another type of data.Ex: if i click on crate mara data should be dispalyed when i click on change makt table data should be dispalyed and also i have user defined buttons are in my grids.
So i have used 2 containers to dispaly to different data.I am able to display the perfectly but the problem is first time when i click on create the grid is displaying when i click on change button the create alv grid is displaying down and change data is dispalying up.
I need only one alv grid at a time.Can anybody please let me know how can i do this.
Thanks,
TaraginiHello,
Also I would suggest if it is relevant data maintain in one interntal table and show/hide based on condition
through fieldcatalog (NO_OUT) parameter.
Thanks -
Help needed Displaying ALV Secondary list without using oops concept
Hi Experts
Help needed Displaying ALV Secondary list without using oops concept.
its urgent
regds
rajasekharhi chk this code
******************TABLES DECLARATION*****************
TABLES : VBAP,MARA.
*****************TYPE POOLS**************************
TYPE-POOLS : SLIS.
****************INTERNAL TABLES**********************
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF IT_VBAP.
****************TEMPORARY VARIABLES******************
DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
*****************FIELD CATALOG***********************
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
****************LAYOUT*******************************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
***************VARIANT*******************************
DATA : G_VARIANT LIKE DISVARIANT.
****************SAVE*********************************
DATA : G_SAVE(1) TYPE C.
*****************EVENTS******************************
DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
G_EVENTS TYPE SLIS_T_EVENT.
******************PF STATUS**************************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
******************USER COMMAND************************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
****************SELECTION SCREEN************************
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
***************AT SELECTION SCREEN*********************
AT SELECTION-SCREEN.
PERFORM VALIDATE.
**************START-OF-SELECTION**************************
START-OF-SELECTION.
PERFORM GET_DETAILS.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM VARIANT.
PERFORM SAVE.
PERFORM EVENTS.
PERFORM ALV_DISPLAY.
*********************FORMS*******************************************
*& Form validate
text
--> p1 text
<-- p2 text
FORM VALIDATE .
SELECT SINGLE VBELN
FROM VBAP
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'enter valid vbeln'.
ENDIF.
ENDFORM. " validate
*& Form get_details
text
--> p1 text
<-- p2 text
FORM GET_DETAILS .
SELECT VBELN
POSNR
MATNR
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no details found'.
ENDIF.
ENDFORM. " get_details
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-OUTPUTLEN = 10.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-OUTPUTLEN = 6.
WA_FIELDCAT-SELTEXT_L = 'ITEM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " fieldcat
*& Form LAYOUT
text
--> p1 text
<-- p2 text
FORM LAYOUT .
WA_LAYOUT-ZEBRA = 'X'.
ENDFORM. " LAYOUT
*& Form VARIANT
text
--> p1 text
<-- p2 text
FORM VARIANT .
CLEAR G_VARIANT.
G_VARIANT-REPORT = SY-REPID.
ENDFORM. " VARIANT
*& Form SAVE
text
--> p1 text
<-- p2 text
FORM SAVE .
CLEAR G_SAVE.
G_SAVE = 'A'.
ENDFORM. " SAVE
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR XS_EVENTS.
XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND XS_EVENTS TO G_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
WRITE :/ ' INTELLI GROUP'.
ENDFORM. "TOP_OF_PAGE
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = G_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_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. " ALV_DISPLAY
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'DC'.
READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE MTART
FROM MARA
INTO V_MTART
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
ELSE.
WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
WRITE :/ 'MATERIAL TYPE :' , V_MTART.
ENDIF.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CLOSE'.
CALL TRANSACTION 'SE38'.
ENDCASE.
REPORT Z_ALV_INTERACTIVE MESSAGE-ID ZMSG_50651
LINE-SIZE 100
LINE-COUNT 60
NO STANDARD PAGE HEADING.
******************TABLES DECLARATION*****************
TABLES : VBAP,MARA.
*****************TYPE POOLS**************************
TYPE-POOLS : SLIS.
****************INTERNAL TABLES**********************
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF IT_VBAP.
****************TEMPORARY VARIABLES******************
DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
*****************FIELD CATALOG***********************
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
****************LAYOUT*******************************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
***************VARIANT*******************************
DATA : G_VARIANT LIKE DISVARIANT.
****************SAVE*********************************
DATA : G_SAVE(1) TYPE C.
*****************EVENTS******************************
DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
G_EVENTS TYPE SLIS_T_EVENT.
******************PF STATUS**************************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
******************USER COMMAND************************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
****************SELECTION SCREEN************************
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
***************AT SELECTION SCREEN*********************
AT SELECTION-SCREEN.
PERFORM VALIDATE.
**************START-OF-SELECTION**************************
START-OF-SELECTION.
PERFORM GET_DETAILS.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM VARIANT.
PERFORM SAVE.
PERFORM EVENTS.
PERFORM ALV_DISPLAY.
*********************FORMS*******************************************
*& Form validate
text
--> p1 text
<-- p2 text
FORM VALIDATE .
SELECT SINGLE VBELN
FROM VBAP
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'enter valid vbeln'.
ENDIF.
ENDFORM. " validate
*& Form get_details
text
--> p1 text
<-- p2 text
FORM GET_DETAILS .
SELECT VBELN
POSNR
MATNR
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no details found'.
ENDIF.
ENDFORM. " get_details
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-OUTPUTLEN = 10.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-OUTPUTLEN = 6.
WA_FIELDCAT-SELTEXT_L = 'ITEM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " fieldcat
*& Form LAYOUT
text
--> p1 text
<-- p2 text
FORM LAYOUT .
WA_LAYOUT-ZEBRA = 'X'.
ENDFORM. " LAYOUT
*& Form VARIANT
text
--> p1 text
<-- p2 text
FORM VARIANT .
CLEAR G_VARIANT.
G_VARIANT-REPORT = SY-REPID.
ENDFORM. " VARIANT
*& Form SAVE
text
--> p1 text
<-- p2 text
FORM SAVE .
CLEAR G_SAVE.
G_SAVE = 'A'.
ENDFORM. " SAVE
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR XS_EVENTS.
XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND XS_EVENTS TO G_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
WRITE :/ ' INTELLI GROUP'.
ENDFORM. "TOP_OF_PAGE
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = G_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_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. " ALV_DISPLAY
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'DC'.
READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE MTART
FROM MARA
INTO V_MTART
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
ELSE.
WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
WRITE :/ 'MATERIAL TYPE :' , V_MTART.
SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
WITH P_MTART EQ V_MTART.
ENDIF.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CLOSE'.
CALL TRANSACTION 'SE38'.
ENDCASE.
plz reward if useful -
Customer line item report with GL account display
Hi
Please guide some customer reports for the following
Client need a Customer Line item reports with Customer number and repective gl account for each line items.
for ex: Product A/c xxxxxx
To Sales A/c xxxxxx(recon A/c)
Thanks in advanceHi
1.FBL5N - Customer Line item Display (Customer Line item reports with Customer number )
2.FBL1N - Vendor Line item Display
3.FBL3N - General Ledger Line item Display
The sales entry will be
DR Customer - to view this entry FBL5N
CR Sales - to view this entry FBL3N
Hope this will be usefull -
I have a lot of various book mark folders with websites contained within each folder. I am able to sort the websites within each folder alphabetically by name but I cannot find a way to sort the bookmark folders themselves alphabetically by name.I am not talking about in a view mode but in the way they are displayed when I click on my bookmarks tab. Can someone explain to me how to accomplish this other than manually dragging them as this is extremely hard for me due to the fact that I am a quadriplegic with limited hand movement dexterity
Bookmark folders that you created are in the Bookmarks Menu folder. "Sort" that folder.
http://kb.mozillazine.org/Sorting_bookmarks_alphabetically -
Reg. can we display alv grid using field groups (extracts)
Hi,
can we display alv grid using field groups (extracts). is this possible. i have to develop a blocked alv.
tnks
Yerukala SettyNo, you will need the data in an internal table to use ALV.
Cheers
Allan
Maybe you are looking for
-
Where exactly are the comments from my iWeb Site stored?
Anybody know where on my iDisk the user entered comments for my iWeb blog entries are stored? I looked around and couldn't find anything obvious.
-
Forget PCs. The Real Bloatware Problem Is on Android
In 2015, PCs are now a bit of a sideline skirmish. The most important front right now is Android. On phones running Google's mobile operating system, the forces of bloatware are winning. Forget PCs. The Real Bloatware Problem Is on Android | WIRED
-
Calculate Paths without endNode
Hi I was using the Java APIs to calculate paths for my network by giving only the starting node and a constraint. Is the same option available in PL/SQL procedures? From what I see u have to define an end node also Thank u K
-
Question on batch renaming.
I have some photos that I need to partially rename. Example > Currently they are named ABC_0001, ABC_0002, ABC_0003, etc. I only want to change the first part of the name. So I need the names to DEF_0001, DEF_0002, etc. It important not to change the
-
How to buy iphone for europe online
Hello I have already traveled to America and I bought an iphone 5, because I live in Italy I asked for one that supported the European bands. I returned in the states in November, I can buy the iPhone 6 who supported European bands but ONLINE? thank