Modifiying selection screen of report RIQMEL20 coming from LDB 'QMI'
It is intended to modify the SAP standard report RIQMEL20 . This report RIQMEL20 is using the Logical Data Base "QMI" for the selection screen block & data selections which we need to modify. That means we need to modify this SAP Standard LDB "QMI" to add these extra fields & logic.
When we are try to change this LDB it is asking for a access key. Also we don't know the implications of changing this standard LDB.
How we can add the extra fields & its logic?
Hi Sunil,
Use screen-variance for tht.
Transaction for screen variance is SHD0.
<b>plz reward points if helpful or if it solves ur query.</b>
Thanks
Chinmay
Similar Messages
-
Set default value to selection screen for report
Hi All,
I've a report selection screen which has 3 fields from the report category: PNPPERNR, PNPSTAT1, PNPBTRTL. My logical database is PNPCE.
How can I set the default value to the field PNPSTAT1? Means when I first display the selection screen, the value for this field will automatically display '3' in it.
Hope someone can help me on this.
Thanks.Hi All,
Thanks for reply. But I think I should declare my question clearer.
Actually it's not a parameter.
My problem is when using the logical database, if you define a TABLES: PERNR, then you can see the SAP standard report selection screen. So my selection screen has 3 standard fields which are PNPPERNR, PNPSTAT1, and PNPBTRTL.
I need to set the default value '3' to field PNPSTAT1.
Thanks. -
Adding gsber in selection screen of report painter
To gurus,
I have a small requirement, I have to get business area (GSBER) in selection screen of report.
I have developed the report using report painter FGI1 --FAGLFLEXT which is having gsber field.
In selection screen it self i want this GSBER FIELD .How to achieve it.
kindly guide me.
regards,
padmaja.Hi
What I understand from your question is you want bussiness area value on selection screen you can achive this by just using the by export/import parameter or by get/set parameter id.
Please elaborate what exactly you want.
Regards
Sagar. -
How to create multiple selection screens in reports
How to create multiple selection screens in reports
Thanks,
SridharEx: hope you will find an idea from the below example :
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
CITYTO LIKE SPFLI-CITYFORM.
SELECTION-SCREEN end OF BLOCK SEL1
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS SEL1.
SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2
SELECTION-SCREEN END OF SCREEN 5000.
INITIALIZATION.
TIT1 = 'ITIES'.
aT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN '0500'.
MESSAGE W159(at) WITH 'SCREEN 500'.
WHEN '1000'.
MESSAGE W159(at) WITH 'SCREEN 1000'.
ENDCASE.
START-OF-SELECTION.
TIT1 = 'CITIES FOR AIRPORTS'.
TIT2 = 'AIRPORTS'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
TIT1 = 'CITIES AGAIN'.
CALL SELECTION-SCREEN 1000 STARTING AT 10 10. -
Creating Selection screen in Report Painter
Good day everyone,
Does anyone know how I could create a selection screen in Report Writer? Thanks!
>Christian<Hi,
Simple Parameters or Selec-options statements will suffice.
Eg : Parameters : p_matnr type mara-matnr.
select-options : s_matnr for mara-matnr.
In selection screen, you may have selec-options, parameters, check boxes, radio buttons etc.
Regards,
Sujatha. -
Modification on selection screen of report
Hello guys,
I have a requirement where in i need to modify the initial selection screen as per clients requirement. The scenario is as follows:
Suppose 'EMPLOYEE' and 'PORTFOLIO' are two of the fields of a cube on which the report will be run. Now suppose there are three employees as A, B and C and A handles portfolios X & Y, B handles portfolios W & Y while C handles portfolios X & Z.
The initial selection screen of report will have two selection fields first as the employee and second as the portfolio.
When we do F4 at employee it will display A, B and C. Now the requirement is if we F4 at portfolio it should display only the relevant one for that employee.
For example: if i give employee as A and when i do F4 at portfolio screen it should give me only X and Y and not all the portfolios viz. W, X, Y & Z
Is there a way to achieve the above scenario????Hi Chakradhar,
Refer this code :
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-456.
PARAMETERS PO RADIOBUTTON GROUP RADI USER-COMMAND R.
SELECTION-SCREEN END OF BLOCK BL2.
AT SELECTION-SCREEN OUTPUT.
CALL SCREEN 100.
when user will click on this radio button , a pop up screen will appear dynamically.
Reward points if helpful.
Regards,
Hemant -
AT SELECTION-SCREEN stops report
Hello,
I run a report using the AT SELECTION-SCREEN stmt.
Below AT SELECTION-SCREEN is an IF ... ELSE block. Within that block the report checks, whether the user input (made in a SELECT-OPTIONS) complies some requirements.
I check for example, if that what the user types in matches a defined string...
But if i use an AT SELECTION-SCREEN, the report does not continue after execution after that!
It returns to the selction screen...
How can I achieve, that the report continues with execution...?
Thx,
holgerHi Holger,
1. This is the default behaviour.
2. For report purpose execution,
the event is
START-OF-SELECTION ( and not at selection-screen)
3. However u CAN ACHIEVE this by :
after all validations , use the syntax
LEAVE TO LIST-PROCESSING.
4. I tried the same at my end,
its working fine.
5. However, if u use step 3,
there will be a problem :
after the execution of report,
it wil get HANG. ie. it won't then
get back using the toolbar buttons.
U may try it for yourself.
6. Bottom line is:
use
START-OF-SELECTION (FOR FINAL EXECUTION OF THE REPORT)
Regards,
Amit M.
Message was edited by: Amit Mittal -
FM to display Selection screen on report output??
Hi Experts,
Is there an FM to display Selection screen on report output.
Thanks In Advance.Hi Ashwin,
Refer to below link
http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
or
The easiest way is to define your selection screen in the TOP include of your module pool.
Then call the selection screen.
Selection Screen
selection-screen begin of screen 1010 as window title text-001.
selection-screen begin of block b1 with frame title text-002.
parameters: p_vornr type resb-vornr,
p_refno(20) type c,
p_plnid type zplcfg-plnid as listbox visible length 20,
p_sorts type c as listbox visible length 20.
selection-screen begin of line.
selection-screen comment (20) text-004.
selection-screen position 33.
parameters: p_order as checkbox default 'X'.
selection-screen end of line.
selection-screen end of block b1.
selection-screen end of screen 1010.
Now call the selection screen.
call selection-screen 1010.
if sy-subrc = 0.
perform get_production_orders.
perform process_orders.
endif.
Thanks!! -
How we can assign the customised selection screen to report category
hai
gurus
how we can assign the customised selection screen to report categoryHi Naresh,
You can do like this.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME.
SELECT-OPTIONS: S_FKART FOR VBRK-FKART.
SELECT-OPTIONS: S_FKDAT FOR VBRK-FKDAT OBLIGATORY.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
SELECT-OPTIONS: S_AUART FOR VBAK-AUART.
SELECTION-SCREEN END OF BLOCK SELECTION.
SELECTION-SCREEN END OF BLOCK B1.
if you give me brief i can help you out more.
Thank you .
Regards
Ram -
How to avoid default selection screen in HR interfaces(using pnp ldbs)
How to avoid default selection screen in HR interfaces(using pnp ldbs)
Dear Rakesh,
The report category is used to change the selection screen of programs that use the 'PNP' logical database.
See links bellow:
http://www.sapdevelopment.co.uk/hr/hr_repcat.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/15/229357553611d3967f00a0c9306433/frameset.htm
Report categories for selection screen in HR programming
Also visit the following blog:
/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
Regards,
Naveen. -
Selection Screen in Report Painter
Dear Experts,
I have an issue in the report painter. While executing the report from GRR2, selection screen is not displayed but report is coming as I expected.
I want to create the selection screen for this report. I have created this report without copying from the standard report.
Thanks in Advance.
Regards,
AswimnHi,
Please refer following links.
<Link farm removed by moderator>
Regards,
Renuka S.
Edited by: Vinod Kumar on May 25, 2011 10:12 AM -
How to include text lable in Variable selection screen (Web Reporting)
Hi Experts,
I have created one query and in Web Report-->variable selection screen I have one Date field for that field I have to display a label stating that user to input date in the format YYYY.MM(like a text label).Actually I have created 10 to 12 report . I need u r suggestion such that a single change will reflect my requirement in all the reports and I have created all the reports for same multiprovider.
Thanks in Advance
Yours,
BalaBala,
Prompts can originate from one of two places: either via Designer and using the @prompt functionality or while creating the report building a prompt in the Query Filters panel. If the prompt was built using the @prompt method, and all 10-12 reports are using that particular @prompt, then one change via Designer will cause all reports to reflect the new verbiage. If you built the 10-12 reports using the prompt in the second scenario, then each individual report needs to be opened, modified and then saved. If you must use the latter method, then you can open the first report, modify the prompt verbiage, then highlight the new verbiage with your mouse and hit Control-C (which copies that text to the Clipboard of your Windows system). Then go to the second report, locate the verbiage that needs to be changed, delete it, then Control-V (which pastes), and voila, some keyboarding strokes are saved....
Thanks,
John -
Choose fields option in Selection Screen of report program.
Hi Experts,
Actually In my requirement , the user wants to display the output fields in ALV Grid and also in Block ALV format.They need 10 fields to be displayed by default and the additional fields has to be displayed based on the choose fields option
( i.e like SE11 choose fields option ) provided in the selection screen of this report program.So based on this the output has to be displayed.
Pls suggest ur ideas.....
Thanks in advance.
Regards,
Srinivas.Hi ,
The following code will be helpful for your requirement...
REPORT ypm_hist_dyn.
* T Y P E - P O O L S *
TYPE-POOLS: slis.
* T Y P E S *
TYPES : BEGIN OF t_equz,
datbi TYPE datbi, " Valid To Date
equnr TYPE equnr, " Equipment Number
erdat TYPE erdat, " Date on Which Record Was Created
aedat TYPE aedat, " Changed On
iloan TYPE iloan, " Location and account assignment for technical object
gewrk TYPE lgwid, " Object ID of the Work Center
ingrp TYPE ingrp, " Planner Group for Customer Service and Plant Maintenance
END OF t_equz,
BEGIN OF t_equz1,
datbi TYPE datbi, " Valid To Date
equnr TYPE equnr, " Equipment Number
erdat TYPE erdat, " Date on Which Record Was Created
aedat TYPE aedat, " Changed On
END OF t_equz1,
BEGIN OF t_iloa,
iloan TYPE iloan, "Location and account assignment for technical object
tplnr TYPE tplnr, " Functional Location
msgrp TYPE raumnr, " Room
END OF t_iloa,
BEGIN OF t_iflotx,
tplnr TYPE tplnr, "Functional Location
pltxt TYPE pltxt, " Description of functional location
END OF t_iflotx,
BEGIN OF t_equi,
equnr TYPE equnr, " Equipment Number
eqart TYPE eqart, "Type of Technical Object
END OF t_equi,
BEGIN OF t_crhd,
objid TYPE cr_objid, "Object ID of the resource
arbpl TYPE arbpl, "Work center
END OF t_crhd,
BEGIN OF t_eqkt,
equnr TYPE equnr, "Equipment Number
eqktx TYPE ktx01, "Description of technical object
END OF t_eqkt,
BEGIN OF t_t370k_t,
eqart TYPE eqart, "Type of Technical Object
eartx TYPE eartx, "Text for Object Type
END OF t_t370k_t,
BEGIN OF t_t024i,
ingrp TYPE ingrp, "Planner Group for Customer Service and Plant Maintenance
innam TYPE innam, "Name of the Maintenance Planner Group
END OF t_t024i,
BEGIN OF t_viqmel,
equnr TYPE equnr, "Equipment Number
qmnum TYPE qmnum, "Notification No
qmdat TYPE qmdat, "Date of Notification
bequi TYPE bequi, "Equipment Affected
iloan TYPE iloan, "Location and account assignment for technical object
END OF t_viqmel,
BEGIN OF t_final,
equnr TYPE equz-equnr,
eqktx TYPE eqkt-eqktx,
tplnr TYPE iloa-tplnr,
pltxt TYPE iflotx-pltxt,
iloan TYPE iloan,
datbi TYPE equz-datbi,
ingrp TYPE t024i-ingrp,
erdat TYPE equz-erdat,
enddt1 TYPE char10,
aedat TYPE equz-aedat,
innam TYPE t024i-innam,
equart TYPE equi-eqart,
eartx TYPE t370k_t-eartx,
qmnum TYPE viqmel-qmnum,
arbpl TYPE crhd-arbpl,
msgrp TYPE iloa-msgrp,
dat_diff TYPE char10,
END OF t_final,
BEGIN OF t_final1,
equnr TYPE equz-equnr,
eqktx TYPE eqkt-eqktx,
tplnr TYPE iloa-tplnr,
pltxt TYPE iflotx-pltxt,
END OF t_final1.
DATA: it_equz TYPE STANDARD TABLE OF t_equz,
it_iloa TYPE STANDARD TABLE OF t_iloa,
it_iflotx TYPE STANDARD TABLE OF t_iflotx,
it_equi TYPE STANDARD TABLE OF t_equi,
it_crhd TYPE STANDARD TABLE OF t_crhd,
it_eqkt TYPE STANDARD TABLE OF t_eqkt,
it_t370k_t TYPE STANDARD TABLE OF t_t370k_t,
it_t024i TYPE STANDARD TABLE OF t_t024i,
it_viqmel TYPE STANDARD TABLE OF t_viqmel,
it_final TYPE STANDARD TABLE OF t_final,
it_final1 TYPE STANDARD TABLE OF t_final1,
it_equz1 TYPE STANDARD TABLE OF t_equz1.
DATA: wa_equz TYPE t_equz,
wa_iloa TYPE t_iloa,
wa_iflotx TYPE t_iflotx,
wa_equi TYPE t_equi,
wa_crhd TYPE t_crhd,
wa_eqkt TYPE t_eqkt,
wa_t370k_t TYPE t_t370k_t,
wa_t024i TYPE t_t024i,
wa_viqmel TYPE t_viqmel,
wa_final TYPE t_final,
wa_final1 TYPE t_final1,
wa_equz1 TYPE t_equz.
DATA: t_equnr TYPE equz-equnr, "EQUZ-EQUNR
t_tplnr TYPE iloa-tplnr, "Functional Location
t_datbi TYPE equz-datbi, "Date
t_ingrp TYPE equz-ingrp, "Planner Group
t_eqart TYPE equi-eqart, "Technical Object
w_diff TYPE p,
w_time TYPE t.
* ALV DATA DECLARATION *
* Field Catalog
TYPES: BEGIN OF t_fldnam,
fld TYPE fieldname,
desc TYPE char30,
END OF t_fldnam.
DATA: is_layout TYPE slis_layout_alv,
it_fieldcat TYPE slis_t_fieldcat_alv,
is_fieldcat TYPE slis_fieldcat_alv,
it_fldnam TYPE STANDARD TABLE OF t_fldnam,
wa_fldnam TYPE t_fldnam,
it_sort TYPE STANDARD TABLE OF slis_t_sortinfo_alv,
wa_sort LIKE LINE OF it_sort.
DATA: i_events TYPE slis_t_event,
ls_line TYPE slis_listheader,
gt_list_top_of_page TYPE slis_t_listheader, "FOR TOP OF PAGE
gt_list_end_of_page TYPE slis_t_listheader. "FOR END OF PAGE
DATA : formname_top_of_page TYPE slis_formname VALUE
'GENERATE_TOP_OF_PAGE',
formname_end_of_page TYPE slis_formname VALUE
'GENERATE_END_OF_PAGE',
formname_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
* C O N S T A N T S *
*CONSTANTS: c_top TYPE slis_formname VALUE 'TOP_OF_PAGE',
* c_final(40) TYPE c VALUE 'IT_FINAL',
* c_detail(15) TYPE c VALUE 'IT_FINAL1'.
DATA : g_save(1) TYPE c,
g_exit(1) TYPE c,
g_variant LIKE disvariant,
gx_variant LIKE disvariant.
* S E L E C T I O N S C R E E N *
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_equnr FOR t_equnr,
s_tplnr FOR t_tplnr,
s_datbi FOR t_datbi ,
s_ingrp FOR t_ingrp,
s_eqart FOR t_eqart.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(16) text-007.
SELECTION-SCREEN POSITION 22.
PARAMETERS : 11_flds RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND g1.
SELECTION-SCREEN COMMENT 39(13) text-009.
SELECTION-SCREEN POSITION 54.
PARAMETERS : 6_flds RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : END OF BLOCK blk2.
SELECTION-SCREEN:BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
PARAMETERS: alv_list RADIOBUTTON GROUP gp1 DEFAULT 'X'.
PARAMETERS: alv_grid RADIOBUTTON GROUP gp1.
SELECTION-SCREEN:END OF BLOCK b2.
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.
PARAMETERS : p_vari LIKE disvariant-variant.
SELECTION-SCREEN: END OF BLOCK b3.
AT SELECTION-SCREEN.
PERFORM date_range.
IF s_datbi[] IS INITIAL.
MESSAGE e398(00) WITH 'ENTER A VALUE FOR DATE'(012).
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
START-OF-SELECTION.
IF 11_flds EQ 'X'.
PERFORM fill_equz.
PERFORM fill_iloa.
PERFORM fill_iflotx.
PERFORM fill_equi.
PERFORM fill_t370k_t.
PERFORM fill_t024i.
PERFORM fill_crhd.
PERFORM fill_eqkt.
PERFORM fill_viqmel.
ELSE.
PERFORM fill_equz.
PERFORM fill_iloa.
PERFORM fill_iflotx.
PERFORM haha_final.
PERFORM dyn_tab.
ENDIF.
PERFORM fill_final.
PERFORM get_day_diff.
* END-OF-SELECTION *
END-OF-SELECTION.
*Display Output in ALV Format
* PERFORM populate_layout.
PERFORM populate_fcat.
PERFORM populate_events .
* PERFORM gen_top.
PERFORM display_alv .
*& Form FILL_EQUZ
* text
* --> p1 text
* <-- p2 text
FORM fill_equz .
IF s_datbi-high IS INITIAL.
s_datbi-high = '99990701'.
ENDIF.
* IF s_datbi-LOW IS INITIAL.
* s_datbi-LOW = '20071201'.
* ENDIF.
SELECT datbi
equnr
erdat
aedat
iloan
gewrk
ingrp
FROM equz
INTO CORRESPONDING FIELDS OF TABLE it_equz
* WHERE datbi IN s_datbi AND equnr IN s_equnr.
WHERE equnr IN s_equnr
AND ingrp IN s_ingrp
AND datbi LE s_datbi-high
AND datbi GE s_datbi-low.
ENDFORM. " FILL_EQUZ
*& Form FILL_ILOA
* text
* --> p1 text
* <-- p2 text
FORM fill_iloa .
SELECT iloan
tplnr
msgrp
INTO CORRESPONDING FIELDS OF TABLE it_iloa
FROM iloa
FOR ALL ENTRIES IN it_equz
WHERE iloan = it_equz-iloan.
ENDFORM. " FILL_ILOA
*& Form FILL_IFLOTX
* text
* --> p1 text
* <-- p2 text
FORM fill_iflotx .
SELECT tplnr
pltxt
INTO CORRESPONDING FIELDS OF TABLE it_iflotx
FROM iflotx
FOR ALL ENTRIES IN it_iloa
WHERE tplnr = it_iloa-tplnr.
ENDFORM. " FILL_IFLOTX
*& Form FILL_EQUI
* text
* --> p1 text
* <-- p2 text
FORM fill_equi .
SELECT equnr
eqart
INTO CORRESPONDING FIELDS OF TABLE it_equi
FROM equi
FOR ALL ENTRIES IN it_equz
WHERE equnr = it_equz-equnr.
ENDFORM. " FILL_EQUI
*& Form FILL_T370K_T
* text
* --> p1 text
* <-- p2 text
FORM fill_t370k_t .
SELECT eqart
eartx
INTO CORRESPONDING FIELDS OF TABLE it_t370k_t
FROM t370k_t
FOR ALL ENTRIES IN it_equi
WHERE eqart = it_equi-eqart.
ENDFORM. " FILL_T370K_T
*& Form FILL_T024I
* text
* --> p1 text
* <-- p2 text
FORM fill_t024i .
SELECT ingrp
innam
INTO CORRESPONDING FIELDS OF TABLE it_t024i
FROM t024i
FOR ALL ENTRIES IN it_equz
WHERE ingrp = it_equz-ingrp.
ENDFORM. " FILL_T024I
*& Form FILL_CRHD
* text
* --> p1 text
* <-- p2 text
FORM fill_crhd .
SELECT objid
arbpl
INTO CORRESPONDING FIELDS OF TABLE it_crhd
FROM crhd
FOR ALL ENTRIES IN it_equz
WHERE objid = it_equz-gewrk.
ENDFORM. " FILL_CRHD
*& Form FILL_EQKT
* text
* --> p1 text
* <-- p2 text
FORM fill_eqkt .
SELECT equnr
eqktx
INTO CORRESPONDING FIELDS OF TABLE it_eqkt
FROM eqkt
FOR ALL ENTRIES IN it_equz
WHERE equnr = it_equz-equnr.
ENDFORM. " FILL_EQKT
*& Form FILL_VIQMEL
* text
* --> p1 text
* <-- p2 text
FORM fill_viqmel .
ENDFORM. " FILL_VIQMEL
*& Form SHW_DATA
* text
* --> p1 text
* <-- p2 text
FORM shw_data .
LOOP AT it_final1 INTO wa_final1.
WRITE : wa_final1-equnr , wa_final1-eqktx , wa_final1-tplnr , wa_final1-pltxt.
CLEAR wa_final1.
ENDLOOP.
ENDFORM. " SHW_DATA
*& Form POPULATE_LAYOUT
* text
* --> p1 text
* <-- p2 text
*FORM populate_layout .
* is_layout-zebra = 'X'.
* is_layout-colwidth_optimize = 'X'.
* APPEND is_layout.
*ENDFORM. " POPULATE_LAYOUT
*& Form POPULATE_FCAT
* text
* --> p1 text
* <-- p2 text
FORM populate_fcat .
IF 11_flds EQ 'X'.
APPEND 'EQUNR EQUIP NUMBER ' TO it_fldnam.
APPEND 'EQKTX DESC OF EQUIP ' TO it_fldnam.
APPEND 'ERDAT START DATE ' TO it_fldnam.
APPEND 'DATBI END DATE ' TO it_fldnam.
APPEND 'AEDAT CHND ON ' TO it_fldnam.
APPEND 'ILOAN LOC ON ACCOUNT ' TO it_fldnam.
APPEND 'TPLNR FUNC LOC ' TO it_fldnam.
APPEND 'PLTXT DESC FUNC LOC ' TO it_fldnam.
APPEND 'INGRP PLANNER GRP ' TO it_fldnam.
APPEND 'INNAM MAINT PLN GRP ' TO it_fldnam.
APPEND 'DAT_DIFF DATE DIFF ' TO it_fldnam.
ENDIF.
IF 6_flds EQ 'X'.
APPEND 'TPLNR FUNC LOCATION ' TO it_fldnam.
APPEND 'PLTXT DESC OF FUC LOC ' TO it_fldnam.
APPEND 'DATBI END DATE ' TO it_fldnam.
APPEND 'EQUNR EQUIP NUMBER ' TO it_fldnam.
APPEND 'ERDAT START DATE ' TO it_fldnam.
APPEND 'AEDAT CHND ON ' TO it_fldnam.
ENDIF.
ENDFORM. " POPULATE_FCAT
*& Form DISPLAY_ALV
* text
* --> p1 text
* <-- p2 text
FORM display_alv .
*--------------------------------------------------Preparing the Layout*
is_layout-colwidth_optimize = 'X'.
is_layout-zebra = 'X'.
*-------------------------------------------Preparing the Field Catalog*
BREAK-POINT.
LOOP AT it_fldnam INTO wa_fldnam.
is_fieldcat-tabname = 'IT_FINAL'.
is_fieldcat-fieldname = wa_fldnam-fld.
is_fieldcat-seltext_l = wa_fldnam-desc.
is_fieldcat-col_pos = sy-tabix.
IF wa_fldnam-fld = 'EQKTX'.
is_fieldcat-lowercase = ' '.
ENDIF.
APPEND is_fieldcat TO it_fieldcat.
CLEAR : is_fieldcat, wa_fldnam.
ENDLOOP.
*-------------------------------------------------------Calling Display*
IF alv_list = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = is_layout
it_fieldcat = it_fieldcat
it_events = i_events[]
i_default = 'X'
TABLES
t_outtab = it_final
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.
ELSE.
* CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
* EXPORTING
* i_callback_program = sy-repid
* i_callback_top_of_page = 'GEN_TOP'
* is_layout = is_layout
* it_fieldcat = it_fieldcat
* it_events = i_events[]
* i_save = g_save
* is_variant = g_variant
* i_default = 'A'
* TABLES
* t_outtab = it_final
* 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.
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 = ' '
* I_CALLBACK_USER_COMMAND = ' '
i_callback_top_of_page = 'GEN_TOP'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
is_layout = is_layout
it_fieldcat = it_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
* IS_VARIANT = g_variant
* IT_EVENTS = i_events[]
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 20
* I_SCREEN_START_LINE = 30
* I_SCREEN_END_COLUMN = 100
* I_SCREEN_END_LINE = 40
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_final
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.
ENDIF.
ENDFORM. " DISPLAY_ALV
*& Form GET_DAY_DIFF
* text
* --> p1 text
* <-- p2 text
FORM get_day_diff .
w_time = '00:00:00'.
FIELD-SYMBOLS: <deb> LIKE LINE OF it_final.
LOOP AT it_final ASSIGNING <deb>.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
EXPORTING
date1 = <deb>-datbi
time1 = w_time
date2 = <deb>-erdat
time2 = w_time
IMPORTING
datediff = w_diff
* TIMEDIFF =
* EARLIEST =
* EXCEPTIONS
* INVALID_DATETIME = 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.
ELSEIF sy-subrc = 0.
<deb>-dat_diff = w_diff.
* MODIFY it_final FROM WA_FINAL TRANSPORTING dat_diff.
ENDIF.
ENDLOOP.
ENDFORM. " GET_DAY_DIFF
*& Form HAHA_FINAL
* text
* --> p1 text
* <-- p2 text
FORM haha_final .
* FIELD-SYMBOLS: <deb> LIKE LINE OF it_final.
LOOP AT it_iflotx INTO wa_iflotx.
* wa_final1-equnr = wa_iflotx-equnr.
* wa_final1-eqktx = wa_iflotx-eqktx.
wa_final1-tplnr = wa_iflotx-tplnr.
wa_final1-pltxt = wa_iflotx-pltxt.
APPEND wa_final1 TO it_final1.
ENDLOOP.
ENDFORM. " HAHA_FINAL
*& Form DYN_TAB
* text
* --> p1 text
* <-- p2 text
FORM dyn_tab .
LOOP AT it_equz INTO wa_equz.
wa_equz1-datbi = wa_equz-datbi.
wa_equz1-equnr = wa_equz-equnr.
wa_equz1-erdat = wa_equz-erdat.
wa_equz1-aedat = wa_equz-aedat.
APPEND wa_equz1 TO it_equz1.
ENDLOOP.
ENDFORM. " DYN_TAB
*& Form FILL_FINAL1
* text
* --> p1 text
* <-- p2 text
FORM fill_final.
IF 11_flds EQ 'X'.
FIELD-SYMBOLS: <deb> LIKE LINE OF it_equz,
<deb1> LIKE LINE OF it_final.
CLEAR wa_equz.
REFRESH : it_final[].
LOOP AT it_equz ASSIGNING <deb>.
wa_final-equnr = <deb>-equnr.
wa_final-datbi = <deb>-datbi.
wa_final-erdat = <deb>-erdat.
wa_final-aedat = <deb>-aedat.
wa_final-iloan = <deb>-iloan.
wa_final-ingrp = <deb>-ingrp.
APPEND wa_final TO it_final.
CLEAR wa_final.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = <deb1>-iloan.
<deb1>-tplnr = wa_iloa-tplnr.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_iflotx INTO wa_iflotx WITH KEY tplnr = <deb1>-tplnr.
<deb1>-pltxt = wa_iflotx-pltxt.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_eqkt INTO wa_eqkt WITH KEY equnr = <deb1>-equnr.
<deb1>-eqktx = wa_eqkt-eqktx.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_t024i INTO wa_t024i WITH KEY ingrp = <deb1>-ingrp.
<deb1>-innam = wa_t024i-innam.
ENDLOOP.
ELSE.
REFRESH : it_final[].
LOOP AT it_equz INTO wa_equz.
wa_final-datbi = wa_equz-datbi.
wa_final-equnr = wa_equz-equnr.
wa_final-erdat = wa_equz-erdat.
wa_final-aedat = wa_equz-aedat.
wa_final-iloan = wa_equz-iloan.
APPEND wa_final TO it_final.
CLEAR wa_final.
ENDLOOP.
FIELD-SYMBOLS: <deb2> LIKE LINE OF it_final.
LOOP AT it_final ASSIGNING <deb2>.
READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = <deb2>-iloan.
<deb2>-tplnr = wa_iloa-tplnr.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb2>.
READ TABLE it_iflotx INTO wa_iflotx WITH KEY tplnr = <deb2>-tplnr.
<deb2>-pltxt = wa_iflotx-pltxt.
ENDLOOP.
ENDIF.
ENDFORM. " FILL_FINAL
*& Form DATE_RANGE
* text
* --> p1 text
* <-- p2 text
FORM date_range .
DATA :l_dat TYPE i.
IF s_datbi-high IS NOT INITIAL.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = s_datbi-high
i_datum_von = s_datbi-low
IMPORTING
e_tage = l_dat
EXCEPTIONS
days_method_not_defined = 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.
IF l_dat GT '31'.
MESSAGE e398(00) WITH 'Split Your Planning for a range of 31 Days'(012).
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ENDFORM. " DATE_RANGE
*& Form GEN_TOP
* text
* --> p1 text
* <-- p2 text
FORM gen_top .
DATA: info(60),
w_dt TYPE d.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'ALV DISPLAY'.
APPEND ls_line TO gt_list_top_of_page.
CONCATENATE 'Date :' s_datbi-low ' TO ' s_datbi-high INTO info SEPARATED BY space.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = info.
APPEND ls_line TO gt_list_top_of_page.
CLEAR ls_line.
ls_line-typ = 'A'.
ls_line-info = 'By Debarshi Roy'.
APPEND ls_line TO gt_list_top_of_page.
* Generate the End of Page
* CLEAR ls_line.
* ls_line-typ = 'H'.
* ls_line-info = 'ECL'.
* APPEND ls_line TO gt_list_end_of_page.
CLEAR: ls_line.
* PERFORM generate_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page
i_logo = 'DEB'.
ENDFORM. " GEN_TOP
*& Form POPULATE_EVENTS
* text
* --> p1 text
* <-- p2 text
FORM populate_events .
DATA: l_i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_events[].
*----- Pass top-of-page
READ TABLE i_events WITH KEY name = slis_ev_top_of_page
INTO l_i_event.
IF sy-subrc = 0.
MOVE formname_top_of_page TO l_i_event-form.
APPEND l_i_event TO i_events.
ENDIF.
CLEAR l_i_event.
*----- Pass end-of-page
READ TABLE i_events WITH KEY name = slis_ev_end_of_page
INTO l_i_event.
IF sy-subrc = 0.
MOVE formname_end_of_page TO l_i_event-form.
APPEND l_i_event TO i_events.
ENDIF.
CLEAR l_i_event.
*----- Pass user-command
READ TABLE i_events WITH KEY name = slis_ev_user_command
INTO l_i_event.
IF sy-subrc = 0.
MOVE formname_user_command TO l_i_event-form.
APPEND l_i_event TO i_events.
ENDIF.
ENDFORM. " POPULATE_EVENTS
*& Form generate_top_of_page
* text
*FORM generate_top_of_page.
* CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
* EXPORTING
* it_list_commentary = gt_list_top_of_page
* i_logo = 'DEB'.
*ENDFORM. "generate_top_of_page
*& Form generate_end_of_page
* text
FORM generate_end_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_end_of_page
* I_LOGO =
ENDFORM. "generate_end_of_page
*& Form F4_FOR_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM f4_for_variant .
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
p_vari = gx_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " F4_FOR_VARIANT -
User option in selection screen of report
In a report, want to give user an initial option of Calendar year/month OR calendar year/week...
Only the one the user wants should be displayed on the selection screen.
1 Is there a way to give user an option while running the query before the selection screen(variables - uesr input) of the report appears
OR
2 Is there a way to give user a toggle option on the selection screen which displays either calendar year/month or calendar year/week based on user choice but not both.
I am aware that user can easily toggle once the report has been executed, but the purpose is to give user this option initially.
As of now, in the report at the selection screen there are four periods based on calendar year/month. (to facilitate comparison of periods)
eg (m- cal year/month, w - cal year/week)
P1(m)
P2(m)
P3(m)
P4(m)
If we add four more for week
then user will have a cluttered selection screen (as there are many other selection options apart from time)
eg 8 time choices
P1(m)
P2(m)
P3(m)
P4(m)
P1(w)
P2(w)
P3(w)
P4(w)
What I need is a way for at any time, either cal year/month or cal year/week is visible based on user choice.In a report, want to give user an initial option of Calendar year/month OR calendar year/week...
Only the one the user wants should be displayed on the selection screen.
1 Is there a way to give user an option while running the query before the selection screen(variables - uesr input) of the report appears
OR
2 Is there a way to give user a toggle option on the selection screen which displays either calendar year/month or calendar year/week based on user choice but not both.
I am aware that user can easily toggle once the report has been executed, but the purpose is to give user this option initially.
As of now, in the report at the selection screen there are four periods based on calendar year/month. (to facilitate comparison of periods)
eg (m- cal year/month, w - cal year/week)
P1(m)
P2(m)
P3(m)
P4(m)
If we add four more for week
then user will have a cluttered selection screen (as there are many other selection options apart from time)
eg 8 time choices
P1(m)
P2(m)
P3(m)
P4(m)
P1(w)
P2(w)
P3(w)
P4(w)
What I need is a way for at any time, either cal year/month or cal year/week is visible based on user choice. -
Calling the selection screen of report with data for the selection field
I have the selection screen with 2 fileds.
sales order and payment terms.
My requirement is to update the payment terms into the ztable for the given order.
Sometimes the payment terms will be there ie already maintained ,in that case i need to show to the user the existing payment term ,so that he can modify and save that one.If the payment term is not existing then simply i can go inside the program and update the payment term.
What I thought of doing is , writing a report program and then after the user inputs the selection screen ie order number , I Will check in the ztable and if the payment terms is found then i will use the key word leave list processing. But i dont know how to populate the payement term in the selection screen oncegaing from the programHi shiva,
when the user enters sales order number on screen, in parameter 1,
you want to show payment term, on selection screen itself, in parameter 2.
We can use the event
AT SELECTION-SCREEN.
Eg. PO Number <----
> User
Below is sample code for same.
If you enter PO Number, the system will show the corresponding user in parameter2.
Just copy paste.
REPORT YAM_TEMPA09.
PARAMETERS : EBELN LIKE EKKO-EBELN.
PARAMETERS : ERNAM LIKE EKKO-ERNAM.
AT SELECTION-SCREEN.
ERNAM = ''.
SELECT SINGLE ERNAM
FROM EKKO
INTO ERNAM
WHERE EBELN = EBELN.
regards,
amit m.
Maybe you are looking for
-
I am trying to view my ATT wireless bill, and when I ask to view the full version it opens another window and says receiving data from ATT. This doesn't ever change and when I hit any key on any other window in firefox then I am told that firefox has
-
Are there any rapid fire keyboard apps/plugins for Mac/OS X?
For example, if I hold down a key it will act like it's being pressed multiple times in any app?
-
Nokia Lumia 925 Storage problem
Asphalt 8's update was stuck on 'installing' for too long so I rebooted the phone. On starting up again, I saw that the update was restarting and was about to download those 820MBs again. I cancelled the update. Doing this somehow removed the whole g
-
The old someclass$1.class issue
I'm testing pulling project files from jb6 Pro from source safe and running it on another machine with the same installation and config. I have a swing class that has 6 $number.class entries in the deployment jar, and on the other machine I have 4. T
-
Multiple Video Tracks - Selectable
I cant for the life of me figure out how to put more than one video angle within one quicktime file and make it user friendly. I want to create a file similar to a DVD with selectable video angles. I can get my files combined and in the movie propert