I am displaying status (traffic signal ) in output screen in tree display
hi all,
i am displaying status (traffic signal ) in output screen in tree display but instead its displaying <b>@08@</b> like text format....is there any need of conversion....
but it works in normal ALV grid layout.
please suggest a solution....... !
regards.
sivaram.
You need to do the following three steps in order to have "status" indicators on your ALV list:
(1) Add a status or exception field to your itab definition, e.g.
TYPES: BEGIN OF ty_s_outtab.
TYPES: status(4) TYPE c. " status field for LED / traffic light
INCLUDE TYPE KNB1.
TYPES: END OF ty_s_outtab.
DATA:
gt_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
(2) Define the status field in the layout (LVC_S_LAYO):
gs_layout-excp_fname = 'STATUS'. " name of the status/exception field
gs_layout-excp_led = 'X'. " display LEDs, else traffic lights
(3) Loop over the itab and set the appropriate status:
LOOP AT gt_outtab INTO ls_outtab.
IF ( <condition is fulfilled> ).
ls_outtab-status = '3'. " green
ELSEIF ( <condition partially fulfilled> ).
ls_outtab-status = '2'. " yellow
ELSE.
ls_outtab-status = '1'. " red
ENDIF.
MODIFY gt_outtab FROM ls_outtab.
ENDLOOP.
reward points if it is usefull....
Girish
Similar Messages
-
Traffic Signals in ALV Without using oops only for normal Grid Display.
Hi Experts ,
I need to add traffic signals into my normal ALV Grid program without using oops concepts.
Please any one send me full code or provide me one program code without using oops concept for normal ALV Grid .
I searched in many forums but i found most of the programs wriiten using oops concept with ALV's but here my requirement without using oops concept and only normal reuse_alv_grid_display.
Thanks in Advance.
Venky.You can check the below sample code.Traffic light is implemented in it.
REPORT ztest NO STANDARD PAGE HEADING
LINE-SIZE 255 MESSAGE-ID zlqm.
TYPE-POOLS : slis,icon.
TABLES :qals,qave.
INCLUDE : zlqmr002_top, "Global Data Declaration
zlqmr002_selection_screen, "Selection Screen Inputs
zlqmr002_subroutine. "Subroutines
INITIALIZATION
INITIALIZATION.
PERFORM variant_init.
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
Check for Variant existance
PERFORM pai_of_selection_screen.
*Validation for Material
AT SELECTION-SCREEN ON s_matnr.
IF NOT s_matnr IS INITIAL.
SELECT SINGLE matnr
INTO g_matnr
FROM mara
WHERE matnr IN s_matnr.
IF sy-subrc <> 0.
SET CURSOR FIELD 'S_MATNR'.
MESSAGE e000 WITH text-003.
ENDIF.
ENDIF.
*Validation for Plant
AT SELECTION-SCREEN ON s_werk.
IF NOT s_werk IS INITIAL.
SELECT SINGLE werks
INTO g_werk
FROM t001w
WHERE werks IN s_werk.
IF sy-subrc <> 0.
SET CURSOR FIELD 'S_WERK'.
MESSAGE e000 WITH text-004.
ENDIF.
ENDIF.
*Validation for Inspection Type
AT SELECTION-SCREEN ON s_art.
IF NOT s_art IS INITIAL.
SELECT SINGLE art
INTO g_art
FROM tq30
WHERE art IN s_art.
IF sy-subrc <> 0.
SET CURSOR FIELD 'S_ART'.
MESSAGE e000 WITH text-005.
ENDIF.
ENDIF.
*Validation for Code group
AT SELECTION-SCREEN ON s_vcdgrp.
IF NOT s_vcdgrp IS INITIAL.
SELECT SINGLE codegruppe
INTO g_vcdgrp
FROM qpgr
WHERE codegruppe IN s_vcdgrp.
IF sy-subrc <> 0.
SET CURSOR FIELD 'S_VCDGRP'.
MESSAGE e000 WITH text-006.
ENDIF.
ENDIF.
*Validation for Code
AT SELECTION-SCREEN ON s_vcode.
IF NOT s_vcode IS INITIAL.
SELECT SINGLE code
INTO g_vcode
FROM qpcd
WHERE code IN s_vcode.
IF sy-subrc <> 0.
SET CURSOR FIELD 'S_VCODE'.
MESSAGE e000 WITH text-007.
ENDIF.
ENDIF.
Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vcdgrp-low.
PERFORM get_codegroup.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vcdgrp-high.
PERFORM get_codegroup.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vcode-low.
PERFORM get_code.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vcode-high.
PERFORM get_code.
START-OF-SELECTION.
START-OF-SELECTION.
**Selecting data form Database tables
PERFORM select_data TABLES i_out i_out1.
END-OF-SELECTION
END-OF-SELECTION.
**Generate ALV
PERFORM generate_alv.
DATA TYPES
TYPES : BEGIN OF t_qals,
matnr TYPE qals-matnr, "Material
werk TYPE qals-werk, "Plant
mengeneinh TYPE qals-mengeneinh, "UOM
lmenge01 TYPE qals-lmenge01, "Unrestricted qty
lmenge02 TYPE qals-lmenge02, "Scrap qty
lmenge03 TYPE qals-lmenge03, "Sample qty
lmenge04 TYPE qals-lmenge04, "Blocked qty
lmenge05 TYPE qals-lmenge05, "Retain qty
lmenge06 TYPE qals-lmenge06, "Othermat qty
lmenge07 TYPE qals-lmenge07, "RTV qty
lmenge08 TYPE qals-lmenge08, "Exp.scrap qty
prueflos TYPE qals-prueflos, "Inspection lot
art TYPE qals-art, "Inspection type
charg TYPE qals-charg, "Batch
vcode TYPE qave-vcode, "Usage decision
vdatum TYPE qave-vdatum, "Date
qmnum TYPE qmel-qmnum, "Notification
END OF t_qals.
TYPES : BEGIN OF t_out,
icon TYPE icon-id, "Status
matnr TYPE qals-matnr, "Material
werk TYPE qals-werk, "Plant
mengeneinh TYPE qals-mengeneinh, "UOM
vcode TYPE qave-vcode, "Usage decision
mncod(30) TYPE c, "Disposition
lmenge01 TYPE qals-lmenge01, "Unrestricted qty
lmenge02 TYPE qals-lmenge02, "Scrap qty
lmenge03 TYPE qals-lmenge03, "Sample qty
lmenge04 TYPE qals-lmenge04, "Blocked qty
lmenge05 TYPE qals-lmenge05, "Retain qty
lmenge06 TYPE qals-lmenge06, "Othermat qty
lmenge07 TYPE qals-lmenge07, "RTV qty
lmenge08 TYPE qals-lmenge08, "Exp.scrap qty
prueflos TYPE qals-prueflos, "Inspection lot
art TYPE qals-art, "Inspection type
qmnum TYPE qmel-qmnum, "Notification
vdatum TYPE qave-vdatum, "Date
charg TYPE qals-charg, "Batch
END OF t_out.
TYPES : BEGIN OF t_qmsm,
qmnum TYPE qmsm-qmnum,
manum TYPE qmsm-manum,
mncod TYPE qmsm-mncod,
END OF t_qmsm.
TYPES: BEGIN OF t_disp,
qmnum TYPE qmsm-qmnum,
mncod(30) TYPE c,
END OF t_disp.
TYPES: BEGIN OF t_codegrp,
katalogart TYPE qpgt-katalogart,
codegruppe TYPE qpgt-codegruppe,
kurztext TYPE qpgt-kurztext,
END OF t_codegrp.
TYPES: BEGIN OF t_code,
katalogart TYPE qpct-katalogart,
codegruppe TYPE qpct-codegruppe,
code TYPE qpct-code,
version TYPE qpct-version,
kurztext TYPE qpct-kurztext,
END OF t_code.
INTERNAL TABLES
DATA: i_qals TYPE TABLE OF t_qals,
wa_qals LIKE LINE OF i_qals,
i_qmsm TYPE TABLE OF t_qmsm,
wa_qmsm TYPE t_qmsm,
i_disp TYPE TABLE OF t_disp,
wa_disp LIKE LINE OF i_disp,
i_out TYPE TABLE OF t_out,
wa_out TYPE t_out,
i_out1 TYPE TABLE OF t_out,
wa_out1 TYPE t_out,
i_codegrp TYPE TABLE OF t_codegrp,
i_code TYPE TABLE OF t_code,
i_qmsm_tmp TYPE TABLE OF t_qmsm.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
i_layout TYPE slis_layout_alv,
g_repid TYPE sy-repid,
wa_fieldcat TYPE slis_fieldcat_alv.
Global Variables
DATA : g_matnr TYPE matnr,
g_werk TYPE werks,
g_art TYPE qpart,
g_vcdgrp TYPE qvgruppe,
g_vcode TYPE qvcode,
g_red TYPE c,
g_yellow TYPE c,
g_table(6) TYPE c,
g_save(1) TYPE c,
g_exit(1) TYPE c,
g_report TYPE sy-repid,
g_var TYPE disvariant,
g_variant TYPE disvariant.
Constants
CONSTANTS: c_green TYPE icon-id VALUE '@08@',
c_yellow TYPE icon-id VALUE '@09@',
c_red TYPE icon-id VALUE '@0A@'.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR qals-matnr, "Material Number
s_werk FOR qals-werk, "Plant
s_art FOR qals-art, "Inspection Type
s_vcdgrp FOR qave-vcodegrp, "Usage Decision Code Group
s_vcode FOR qave-vcode, "Usage Decision Code
s_vdatum FOR qave-vdatum. "Usage Decision Code Date
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_all RADIOBUTTON GROUP g1 DEFAULT 'X',
p_excp RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-009.
"Variant Selection
PARAMETERS: p_vari TYPE disvariant-variant.
SELECTION-SCREEN END OF BLOCK b3.
*& Form select_data
Select Inspection Details
FORM select_data TABLES p_out STRUCTURE wa_out
p_out1 STRUCTURE wa_out.
DATA:l_mncod(30) TYPE c.
REFRESH : i_qals,i_qmsm,i_qmsm_tmp,i_disp,p_out.
SELECT qalsmatnr qalswerk qals~mengeneinh
qalslmenge01 qalslmenge02 qals~lmenge03
qalslmenge04 qalslmenge05 qals~lmenge06
qalslmenge07 qalslmenge08 qals~prueflos
qalsart qalscharg qave~vcode
qavevdatum qmelqmnum
INTO CORRESPONDING FIELDS OF TABLE i_qals
FROM qals
INNER JOIN qave
ON qalsprueflos = qaveprueflos
INNER JOIN qmel
ON qalsprueflos = qmelprueflos
WHERE qals~matnr IN s_matnr
AND qals~werk IN s_werk
AND qals~art IN s_art
AND qals~stat34 EQ 'X'
AND qave~vcodegrp IN s_vcdgrp
AND qave~vcode IN s_vcode
AND qave~vdatum IN s_vdatum.
IF sy-subrc NE 0.
MESSAGE i000 WITH text-008.
ENDIF.
IF NOT i_qals IS INITIAL.
SELECT qmnum manum mncod INTO TABLE i_qmsm
FROM qmsm
FOR ALL ENTRIES IN i_qals
WHERE qmnum EQ i_qals-qmnum
AND mngrp LIKE 'Q_D%'
AND kzloesch NE 'X'.
ENDIF.
***Concatenation of Disposition Codes
IF NOT i_qmsm IS INITIAL.
i_qmsm_tmp = i_qmsm.
SORT i_qmsm_tmp BY qmnum mncod.
DELETE ADJACENT DUPLICATES FROM i_qmsm_tmp COMPARING qmnum mncod+0(2).
CLEAR wa_qmsm.
LOOP AT i_qmsm_tmp INTO wa_qmsm.
MOVE wa_qmsm-qmnum TO wa_disp-qmnum.
CONCATENATE l_mncod wa_qmsm-mncod+0(2) INTO l_mncod SEPARATED BY space.
AT END OF qmnum.
SHIFT l_mncod LEFT DELETING LEADING space.
MOVE l_mncod TO wa_disp-mncod.
APPEND wa_disp TO i_disp.
CLEAR:wa_disp,l_mncod.
ENDAT.
ENDLOOP.
ENDIF.
***Transfer of data to the output table
LOOP AT i_qals INTO wa_qals.
MOVE-CORRESPONDING wa_qals TO wa_out.
CLEAR wa_disp.
READ TABLE i_disp INTO wa_disp
WITH KEY qmnum = wa_qals-qmnum.
IF sy-subrc EQ 0.
MOVE wa_disp-mncod TO wa_out-mncod.
ENDIF.
PERFORM check_quantity USING wa_qals.
CLEAR wa_qmsm.
LOOP AT i_qmsm INTO wa_qmsm
WHERE qmnum EQ wa_qals-qmnum.
PERFORM check_group USING wa_qals
wa_qmsm.
CLEAR wa_qmsm.
ENDLOOP.
IF g_red NE 'X'.
CLEAR wa_qmsm.
LOOP AT i_qmsm INTO wa_qmsm WHERE qmnum = wa_qals-qmnum
AND mncod0(2) NE wa_qals-vcode0(2).
g_yellow = 'X'.
ENDLOOP.
ENDIF.
IF g_yellow EQ 'X'.
MOVE c_yellow TO wa_out-icon.
ELSEIF g_red EQ 'X'.
MOVE c_red TO wa_out-icon.
ELSE.
MOVE c_green TO wa_out-icon.
ENDIF.
APPEND wa_out TO p_out.
CLEAR:wa_qals,wa_out,g_red,g_yellow.
ENDLOOP.
***IF only exceptions are need to be displayed
IF p_excp EQ 'X'.
CLEAR wa_out.
LOOP AT p_out INTO wa_out WHERE icon EQ c_red.
APPEND wa_out TO p_out1.
ENDLOOP.
ENDIF.
ENDFORM. " select_data
*& Form populate_fieldcat
Populate the Fieldcat Table
FORM populate_fieldcat USING p_table TYPE c.
**status
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'ICON'.
wa_fieldcat-seltext_l = text-010.
wa_fieldcat-outputlen = 15.
wa_fieldcat-icon = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
**Material
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-seltext_l = text-011.
wa_fieldcat-outputlen = 15.
APPEND wa_fieldcat TO i_fieldcat.
**Plant
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'WERK'.
wa_fieldcat-seltext_l = text-012.
wa_fieldcat-outputlen = 7.
APPEND wa_fieldcat TO i_fieldcat.
**Usage Decision
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'VCODE'.
wa_fieldcat-seltext_l = text-013.
wa_fieldcat-outputlen = 15.
APPEND wa_fieldcat TO i_fieldcat.
**Dispositions
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'MNCOD'.
wa_fieldcat-seltext_l = text-014.
wa_fieldcat-outputlen = 18.
APPEND wa_fieldcat TO i_fieldcat.
**UOM
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'MENGENEINH'.
wa_fieldcat-seltext_l = text-015.
wa_fieldcat-outputlen = 18.
APPEND wa_fieldcat TO i_fieldcat.
**Unrestricted Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE01'.
wa_fieldcat-seltext_l = text-016.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Scrap Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE02'.
wa_fieldcat-seltext_l = text-017.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Sample Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE03'.
wa_fieldcat-seltext_l = text-018.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Blocked Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE04'.
wa_fieldcat-seltext_l = text-019.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Retain Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE05'.
wa_fieldcat-seltext_l = text-020.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Other Mat Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE06'.
wa_fieldcat-seltext_l = text-021.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**RTV Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE07'.
wa_fieldcat-seltext_l = text-022.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Exp. Scrap Quantity
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'LMENGE08'.
wa_fieldcat-seltext_l = text-023.
wa_fieldcat-qfieldname = 'MENGENEINH'.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Inspection Lot
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'PRUEFLOS'.
wa_fieldcat-seltext_l = text-024.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Inspection Type
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'ART'.
wa_fieldcat-seltext_l = text-025.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Notification
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'QMNUM'.
wa_fieldcat-seltext_l = text-026.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Date
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'VDATUM'.
wa_fieldcat-seltext_l = text-027.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
**Batch
CLEAR wa_fieldcat.
wa_fieldcat-tabname = p_table.
wa_fieldcat-fieldname = 'CHARG'.
wa_fieldcat-seltext_l = text-028.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
ENDFORM. " populate_fieldcat
*& Form check_quantity
To Check the Quantity
FORM check_quantity USING p_qals TYPE t_qals.
IF wa_qals-lmenge01 GT 0.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND ( mncod CP 'UI'
OR mncod CP 'SR'
OR mncod CP 'ND' ).
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
IF wa_qals-lmenge02 GT 0 AND g_red NE 'X'.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND ( mncod CP 'SC'
OR mncod CP 'SR' ).
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
IF wa_qals-lmenge04 GT 0 AND g_red NE 'X'.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND ( mncod CP 'RW'
OR mncod CP 'RD' ).
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
IF wa_qals-lmenge05 GT 0 AND g_red NE 'X'.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND mncod CP 'R1'.
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
IF wa_qals-lmenge06 GT 0 AND g_red NE 'X'.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND mncod CP 'RD'.
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
IF wa_qals-lmenge07 GT 0 AND g_red NE 'X'.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND mncod CP 'RV'.
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
IF wa_qals-lmenge08 GT 0 AND g_red NE 'X'.
LOOP AT i_disp TRANSPORTING NO FIELDS
WHERE qmnum EQ wa_qals-qmnum
AND ( mncod CP 'SC'
OR mncod CP 'SE' ).
ENDLOOP.
IF sy-subrc NE 0.
g_red = 'X'.
ENDIF.
ENDIF.
ENDFORM. " check_quantity
*& Form check_group
To check the Disposition Code
FORM check_group USING p_qals TYPE t_qals
p_qmsm TYPE t_qmsm.
IF p_qmsm-mncod+0(2) EQ 'UI' AND
NOT p_qals-lmenge01 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'RW' AND
NOT p_qals-lmenge04 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'SC' AND
NOT p_qals-lmenge02 GT 0 AND
NOT p_qals-lmenge08 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'SE' AND
NOT p_qals-lmenge08 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'RV' AND
NOT p_qals-lmenge07 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'SR' AND
NOT p_qals-lmenge01 GT 0 AND
NOT p_qals-lmenge02 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'ND' AND
NOT p_qals-lmenge01 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'R1' AND
NOT p_qals-lmenge05 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
IF p_qmsm-mncod+0(2) EQ 'RD' AND
NOT p_qals-lmenge04 GT 0 AND
NOT p_qals-lmenge06 GT 0.
g_red = 'X'.
EXIT.
ENDIF.
ENDFORM. " check_group
*& Form call_alv
Call ALV Grid Display
FORM call_alv TABLES p_out STRUCTURE wa_out.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
is_layout = i_layout
it_fieldcat = i_fieldcat[]
TABLES
t_outtab = p_out
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. " call_alv
*& Form generate_alv
Build ALV
FORM generate_alv .
IF NOT i_out IS INITIAL OR
NOT i_out1 IS INITIAL.
g_repid = sy-repid.
IF p_excp EQ 'X'.
MOVE 'I_OUT1' TO g_table.
ELSEIF p_all EQ 'X'.
MOVE 'I_OUT' TO g_table.
ENDIF.
PERFORM populate_fieldcat USING g_table.
i_layout-zebra = 'X'.
i_layout-colwidth_optimize = 'X'.
IF p_excp = 'X'.
PERFORM call_alv TABLES i_out1.
ELSEIF p_all = 'X'.
PERFORM call_alv TABLES i_out.
ENDIF.
ENDIF.
ENDFORM. " generate_alv
*& Form PF_STATUS_SET
Setting PF Status
FORM pf_status_set USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STATUS1' .
ENDFORM. "PF_STATUS_SET
*& Form USER_COMMAND
User Command Processing
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'UDG'.
IF p_all EQ 'X'.
CLEAR wa_out.
READ TABLE i_out INTO wa_out INDEX rs_selfield-tabindex.
SET PARAMETER ID 'QLS' FIELD wa_out-prueflos.
ELSEIF p_excp EQ 'X'.
CLEAR wa_out1.
READ TABLE i_out1 INTO wa_out1 INDEX rs_selfield-tabindex.
SET PARAMETER ID 'QLS' FIELD wa_out1-prueflos.
ENDIF.
CALL TRANSACTION 'QA13' AND SKIP FIRST SCREEN.
WHEN 'QNF'.
IF p_all EQ 'X'.
CLEAR wa_out.
READ TABLE i_out INTO wa_out INDEX rs_selfield-tabindex.
SET PARAMETER ID 'IQM' FIELD wa_out-qmnum.
ELSEIF p_excp EQ 'X'.
CLEAR wa_out1.
READ TABLE i_out1 INTO wa_out1 INDEX rs_selfield-tabindex.
SET PARAMETER ID 'IQM' FIELD wa_out1-qmnum.
ENDIF.
CALL TRANSACTION 'QM03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM. "USER_COMMAND
*& Form variant_init
Initialize variant
FORM variant_init .
Set Options: save variants userspecific or general
g_save = 'A'.
g_report = sy-repid.
g_var-report = g_report.
Get default variant
g_variant = g_var.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = g_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = g_variant-variant.
ENDIF.
ENDFORM. " variant_init
*& Form f4_for_variant
F4 help for variant
FORM f4_for_variant .
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_var
i_save = g_save
IMPORTING
e_exit = g_exit
es_variant = g_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 = g_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " f4_for_variant
*& Form pai_of_selection_screen
Check existence of Variant
FORM pai_of_selection_screen .
IF NOT p_vari IS INITIAL.
MOVE g_var TO g_variant.
MOVE p_vari TO g_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = g_save
CHANGING
cs_variant = g_variant.
g_var = g_variant.
ELSE.
PERFORM variant_init.
ENDIF.
ENDFORM. " pai_of_selection_screen
*& Form get_codegroup
Get F4 help for Code Group
FORM get_codegroup .
DATA: i_return TYPE TABLE OF ddshretval.
SELECT katalogart codegruppe kurztext FROM qpgt
INTO TABLE i_codegrp
WHERE katalogart EQ '3'
AND sprache EQ sy-langu.
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'CODEGRUPPE'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_VCDGRP'
value_org = 'S'
TABLES
value_tab = i_codegrp[]
return_tab = i_return[]
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
ENDIF.
ENDFORM. " get_codegroup
*& Form get_code
Get F4 help for Code
FORM get_code .
DATA: l_field TYPE rsscr-name VALUE 'S_VCDGRP',
l_field_kind TYPE rsscr-kind VALUE 'S',
li_par_values TYPE TABLE OF rsparams,
la_par_values TYPE rsparams,
r_cdgrp TYPE RANGE OF qpct-codegruppe,
la_cdgrp LIKE LINE OF r_cdgrp.
**Get the values entered in the selection screen
PERFORM f4_get_related_values IN PROGRAM rsdbspf4
TABLES li_par_values
USING l_field l_field_kind.
IF NOT li_par_values IS INITIAL.
CLEAR:la_cdgrp,la_par_values.
LOOP AT li_par_values INTO la_par_values.
MOVE-CORRESPONDING la_par_values TO la_cdgrp.
IF la_cdgrp-option IS INITIAL.
MOVE 'EQ' TO la_cdgrp-option.
ENDIF.
APPEND la_cdgrp TO r_cdgrp.
CLEAR la_cdgrp.
ENDLOOP.
ENDIF.
SELECT katalogart codegruppe
code version
kurztext FROM qpct
INTO TABLE i_code
WHERE katalogart EQ '3'
AND codegruppe IN r_cdgrp
AND sprache EQ sy-langu.
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'CODE'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_VCODE'
value_org = 'S'
TABLES
value_tab = i_code[]
return_tab =
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
ENDIF.
ENDFORM. " get_code -
Traffic Signal Symbol..!!
Hi All,
I have O/P of web-template when see in Portal for field Error Status as Background color Green for value 0 and Red for other numeric values which i did at query level by using exceptions. Web-Template (using WAD) giving me the same output which is fine.
Requirement1:
But rather then showing field Error status as background Color Green for value 0 and Red for other values. I want to display it in Traffic signal. I mean i want for Error status value 0 as traffic signal symbol green like OOO and for other values something like this OOO. I mean for Green third circle is filled with Green Color and for Red third Circle should be filled with Red color. Please let me know how can i achieve this..
Requirement2:
If requirement1 can not be fulfilled, All i want that for values 0 it should continue show Green color but it should not Its value that is 0 and if it is other than 0 it should only show color RED but no value 1 , 2 etc..
Thanks,
MandyHi Mandy,
Plz. follow the steps below:-
On your Analysis webitem property pane ->
Internal Display -> Modification -> choose Single Module
Alias -> specify any name here
Active -> On
Formats -> ALL
Type -> Generic Module
Generic Module -> Implementation Name -> com.sap.ip.bi.rig.ExceptionImage
Parameter List ->
Parameter 1 -> Name / Expression -> ALERT_GOOD, Value -> Image, Image -> select from MIME Repository (this is for the green traffic signal image corresponding to the green Error Status)
Parameter 2 -> Name / Expression -> ALERT_BAD, Value -> Image, Image -> select from MIME Repository (this is for the red traffic signal image corresponding to the red Error Status)
Note - I assume you have configured Good1 (green Error Status) & Bad1 (red Error Status) in your Query Designer Exception settings - if not plz. replace the Alert Level setting accordingly i.e. you can either use ALERT_GOOD, ALERT_CRITICAL, ALERT_BAD or any of the below ALERT_1 to ALERT_9 to indicate the Alert Levels.
ALERT_1 equates to Good 1
ALERT_2 equates to Good 2
ALERT_3 equates to Good 3
ALERT_4 equates to Critical 1
ALERT_5 equates to Critical 2
ALERT_6 equates to Critical 3
ALERT_7 equates to Bad 1
ALERT_8 equates to Bad 2
ALERT_9 equates to Bad 3
You need to configure one more property of the Analysis webitem inorder that the Image is displayed when the web template is run
Cell Content -> Exception Visualization -> choose SYMBOL here if you wish to show only the traffic signal image (i.e the cells are displayed without background color as configured in Query Designer, the module replaces the standard symbols with your own symbols)
--Priya -
Traffic Signal Implementation in webdynpro View
Hi,
I want to implement the traffic Signal indicator for reporting status(RED, GREEN and YELLOW) in my webdynpro view.
Is there any UI element available for the same in webdynpro or any API to consume them ?
Any alternative suggestion would be helpful too.
Regards,
DebasishYou could use an Image and 3 icons, one for each traffic light.
Armin -
How to display the output screen when I use bdc.
hey expert,
I want to display the output screen when i use bdc without using mode 'A'.
thank you.Hi,
You can go for mode 'E'.. it will display the output screen directly and if there is any error in the transaction you would get that particular screen and you can correct and continue after which you will get the final screen if anything goes fine...
check this sample code....
I had a program if you execute below program it automatically creates a new zprogram.
REPORT zprogram_create_recording.
PARAMETER:
p_prog TYPE sy-repid OBLIGATORY,
p_shtxt TYPE repti OBLIGATORY,
p_pack TYPE devclass DEFAULT '$tmp'.
DATA:
t_bdcdata LIKE
STANDARD TABLE
OF bdcdata.
DATA:
wa_bdcdata LIKE LINE OF t_bdcdata.
REFRESH t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLWBABAP'.
wa_bdcdata-dynpro = '0100'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'RS38M-PROGRAMM'.
wa_bdcdata-fval = p_prog.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'NEW'.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSEDTATTR'.
wa_bdcdata-dynpro = '0200'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'RS38M-REPTI'.
wa_bdcdata-fval = p_shtxt.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'TRDIR-SUBC'.
wa_bdcdata-fval = '1'.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'CONT'.
APPEND wa_bdcdata TO t_bdcdata.
IF p_pack EQ '$TMP'.
*local object
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSTRD'.
wa_bdcdata-dynpro = '0100'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'KO007-L_DEVCLASS'.
wa_bdcdata-fval = ' '.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'TEMP'.
APPEND wa_bdcdata TO t_bdcdata.
ELSE.
*package assignment with request
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSTRD'.
wa_bdcdata-dynpro = '0100'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'KO007-L_DEVCLASS'.
wa_bdcdata-fval = p_pack.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'ADD'.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSTRD'.
wa_bdcdata-dynpro = '0300'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'KO008-TRKORR'.
wa_bdcdata-fval = ' '.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'KO008-AS4TEXT'.
wa_bdcdata-fval = ' '.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'LOCK'.
APPEND wa_bdcdata TO t_bdcdata.
ENDIF. " IF P_PACK EQ '$TMP'
CALL TRANSACTION 'SE38' USING t_bdcdata MODE 'E'.
Hope this would help you..
Regards
Narin Nandivada -
Hi ,
Can any one please tell me how to implement traffic signals in ALV.
Regards
ArunTraffic Signals - Nice term.
This is the program, you should be looking for :
<b>BCALV_GRID_04</b>
In brief, this is what the program does,
a) Have an additional field in the internal table
b) Mark it as the exception field in the layout
c) This additional field should have values, 1, 2 or 3
Regards,
Subramanian V. -
Scipt to test svc status on multiple computers output to html and refresh
script to:
1) test net logon svc on multiple computers
2) output results to html iframe for computers where service is not running
3) be able to have the script update every 30 secondsHi,
Here's a bunch of examples that you can use to build from:
Get-Content .\computerList.txt | ForEach-Object {
Write-Output "Computername is $_"
Get-Content .\computerList.txt | ForEach-Object {
If (Test-Connection -ComputerName $_ -Count 1 -Quiet) {
Write-Output "$_ is up"
} Else {
Write-Output "$_ is down"
Get-Content .\computerList.txt | ForEach-Object {
$serviceState = Get-Service -Name Netlogon -ComputerName $_
If ($serviceState.Status -eq 'Running') {
Write-Output 'Service is running'
} Else {
Write-Output 'Service is not running'
Get-Content .\computerList.txt | ForEach-Object {
Get-Service -Name Netlogon -ComputerName $_ |
Select-Object MachineName,Name,Status
} | ConvertTo-Html | Out-File .\serviceStatus.html
$count = 0
Do {
Write-Output $count
$count++
Start-Sleep -Seconds 30
} Until ( $count -eq 10 )
Do {
Write-Output "This loop doesn't end. You'll need to press CTRL+C to stop this."
Start-Sleep -Seconds 30
} While ($true)
Links to some documentation with additional explanation and examples:
http://ss64.com/ps/get-content.html
http://ss64.com/ps/convertto-html.html
http://ss64.com/ps/test-connection.html
http://ss64.com/ps/foreach-object.html
http://ss64.com/ps/if.html
http://ss64.com/ps/out-file.html
http://ss64.com/ps/get-service.html
http://ss64.com/ps/write-output.html
http://ss64.com/ps/do.html
http://ss64.com/ps/select-object.html
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing) -
Is it possible to compress the size of the output screen displayed by the function module 'REUSE_ALV_LIST_DISPLAY'.?
i am not sure with LIST but this can be done with GRID by using the following parameters
I_SCREEN_START_COLUMN) DEFAULT 0
I_SCREEN_START_LINE) DEFAULT 0
I_SCREEN_END_COLUMN) DEFAULT 0
I_SCREEN_END_LINE) DEFAULT 0 -
How can I read the mobile internals like Battery Status or Signal Strength?
Hi y' all ! How can read Battery Status or SIgnal Strength or even SIM Card. Is it possiblr first of all. If it is Platform independent?
There's no way to do that if you don't find some device specific apis
-
I want push button on output screen
Hi friends,
I want push button on toolbar output screen. After choosing this push button it will display one screen it having data below like this.
.Division channel
.Division
.Sales organization
.Sales Document
.Sales Document Type
.Sales Group
.Sales office
.Month
Plz help mehi sreerama,
to have a push button in ur report, u have to create a GUI status with command.
u can create gui status using command SET PF-STATUS 'XXXX'.
Create a button in GUI status, assign the function code for that button. Example FCODE.
After creating GUI status, u have to use AT USER-COMMAND event for button of GUI status in report program.
Then in ur report program, write like this.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'FCODE'.
........................... " Your Logic to display what ever u want
ENDCASE.
sy-ucomm catches all the function codes of the system.
For further reference, check these links.
To create GUI status:
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801d43454211d189710000e8322d00/frameset.htm
For List Events:
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba2c435c111d1829f0000e829fbfe/frameset.htm
<b><REMOVED BY MODERATOR></b>
Harimanjesh AN
Message was edited by:
Alvaro Tejada Galindo -
Hi,
I am having a requirement in which, I need to display the report, in the output screen I should have a push button which when pressed the report output should be stored in the Application Layer.
Thanks and Regards,
V.K.HI Vikram,
You can create push button in the output list. You have to use SET PF-STATUS statement.
Just follow these stepts for creation of PUSH BUTTON.
1. write SET PF-STATUS 'TEST'.
2. double click on TEST.
3. It will ask you to create status object. click on YES.
4. give the short description and press enter.
5. next screen you will find three things like... MENU BAR, APPLICATION TOOL BAR and FUNCTION KEYS.
6. click on the down arrow that appears next to APPLICATION TOOL BAR.
7. in the items, in first box write your name and press down the text. one popup box will come. press enter.
8. give the function text and press enter.
9. assign key for your push button. and press enter.
10. press enter and activate.
and run your program. you will get push button on output list.
Adding event for the PUSHBUTTON
For the pushbutton use an sy-ucomm ie SAVE to appln toolbar
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SAVE'.
write your code here to save in the appln server
Edited by: Raj on Jun 26, 2008 7:32 PM -
Output screen basic list buttons
Hi frnds,
what are the steps to create buttons in the application toolbar in our output screen.
like i m getting sales header data in my basic list so in the output i m having a button which i press then i will get sales item details.
so can anyone help me how to create that button there in the ouput screen.
regards,
sanjayHi,
You can copy the GUI STATUS STANDARD of the program SAPLKKBL in SE41 and create a new one..
in that add a button in the application toolbar section..
Then use call back pf status parameter to pass the subroutine to display the gui status..
Then use call back subroutine parameter in the alv function module to give the subroutine name..
check this example for using double click to get the item details.
TYPE-POOLS: slis.
DATA: BEGIN OF itab1 OCCURS 0,
vbeln TYPE vbeln,
bstnk TYPE vbak-bstnk,
erdat TYPE vbak-erdat,
kunnr TYPE vbak-kunnr,
END OF itab1.
DATA: BEGIN OF itab2 OCCURS 0,
vbeln TYPE vbeln,
matnr TYPE vbap-matnr,
netpr TYPE vbap-netpr,
kwmeng TYPE vbap-kwmeng,
END OF itab2.
DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
* Get the fieldcatalog1
PERFORM get_fieldcat1.
* Get the fieldcatalog2
PERFORM get_fieldcat2.
SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
INTO TABLE itab1
FROM vbak.
IF NOT itab1[] IS INITIAL.
SELECT vbeln matnr netpr kwmeng UP TO 10 ROWS
INTO TABLE itab2
FROM vbap
FOR ALL ENTRIES IN itab1
WHERE vbeln = itab1-vbeln.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'DISPLAY_DETAIL'
it_fieldcat = t_fieldcatalog1
TABLES
t_outtab = itab1.
* FORM display_detail *
* --> UCOMM *
* --> SELFIELD *
FORM display_detail USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
DATA: itab2_temp LIKE itab2 OCCURS 0 WITH HEADER LINE.
IF ucomm = '&IC1'.
READ TABLE itab1 INDEX selfield-tabindex.
IF sy-subrc = 0.
LOOP AT itab2 WHERE vbeln = itab1-vbeln.
MOVE itab2 TO itab2_temp.
APPEND itab2_temp.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = t_fieldcatalog2
TABLES
t_outtab = itab2_temp.
ENDIF.
ENDIF.
ENDFORM.
* FORM GET_FIELDCAT1 *
FORM get_fieldcat1.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'VBELN'.
s_fieldcatalog-hotspot = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog1.
CLEAR s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'BSTNK'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'BSTNK'.
APPEND s_fieldcatalog TO t_fieldcatalog1.
CLEAR s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'ERDAT'.
APPEND s_fieldcatalog TO t_fieldcatalog1.
CLEAR s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'KUNNR'.
s_fieldcatalog-tabname = 'ITAB1'.
s_fieldcatalog-rollname = 'KUNNR'.
APPEND s_fieldcatalog TO t_fieldcatalog1.
CLEAR s_fieldcatalog.
ENDFORM.
* FORM GET_FIELDCAT2 *
FORM get_fieldcat2.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB2'.
s_fieldcatalog-rollname = 'VBELN'.
APPEND s_fieldcatalog TO t_fieldcatalog2.
CLEAR s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'MATNR'.
s_fieldcatalog-tabname = 'ITAB2'.
s_fieldcatalog-rollname = 'MATNR'.
APPEND s_fieldcatalog TO t_fieldcatalog2.
CLEAR s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'NETPR'.
s_fieldcatalog-tabname = 'ITAB2'.
s_fieldcatalog-rollname = 'NETPR'.
APPEND s_fieldcatalog TO t_fieldcatalog2.
CLEAR s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'KWMENG'.
s_fieldcatalog-tabname = 'ITAB2'.
s_fieldcatalog-rollname = 'KWMENG'.
APPEND s_fieldcatalog TO t_fieldcatalog2.
CLEAR s_fieldcatalog.
ENDFORM.
Thanks
Naren -
How to capture values dynamically from output screen
Hi all,
I have a new requirement.
i developed a report which is showing output correctly. Here i have to take a check box for every record in output screen. if i check some of the check boxs then it should allow for further processing.
i succeeded upto put checkboxes on output screen.
but i don't know how to capture the values of checkboxes of every record into an internal table. it is necessary to capture into an internal table
will it be work by using LOOP AT SCREEN statement.
could you please explain with examples. it is normal report program only.
i would appreciate an early reply
Regards
PrabhakarSample code for usage:
Internal table for Region and its Description
data: begin of t_t005u occurs 0,
LAND1 like t005u-land1,
BLAND like t005u-bland,
Bezei like t005u-bezei,
end of t_t005u.
Ranges for Country
ranges: r_land1 for t005u-land1.
Get the country codes and their descriptions
refresh r_land1.
clear r_land1.
refresh t_dynpfields.
move 'V_LAND1' to t_dynpfields-fieldname.
append t_dynpfields.
clear t_dynpfields.
Read the value in the Country field on the screen
call function 'DYNP_VALUES_READ'
EXPORTING
dyname = 'SAPLZ_VENDOR_MASTER'
dynumb = '0004'
translate_to_upper = 'X'
TABLES
dynpfields = t_dynpfields
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
read table t_dynpfields with key fieldname = 'V_LAND1'.
if not t_dynpfields-FIELDVALUE is initial.
r_land1-low = t_dynpfields-FIELDVALUE.
r_land1-sign = 'I'.
r_land1-option = 'EQ'.
append r_land1.
clear r_land1.
endif.
Get the Regions to be displayed as F4 Help
select land1
bland
bezei
from t005u
into table t_t005u
where spras = 'EN'
and land1 in r_land1.
if not t_t005u[] is initial..
Popup to display Valid Regions for the selected country
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 60
ENDPOS_ROW = 40
STARTPOS_COL = 40
STARTPOS_ROW = 20
TITLETEXT = 'Region'
IMPORTING
CHOISE = v_choice
TABLES
VALUETAB = t_t005u
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
if sy-subrc = 0.
if v_activity = 'V'.
read table t_t005u index v_choice.
if sy-subrc = 0.
v_regio = t_t005u-bland.
move 'V_BEZEI' to t_dynpfields-fieldname.
move t_t005u-bezei to t_dynpfields-fieldvalue.
append t_dynpfields.
Update the Region description on the screen.
call function 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZ_VENDOR_MASTER'
dynumb = '0004'
TABLES
dynpfields = t_dynpfields
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
endif.
endif.
endif.
endif. -
Hi all
In the component overview screen of CO01 I want to disable all the field in screen of table control.I want to make it as output screen only.
Thanks & Regards,
Rajib.Isn't that just exactly what transaction CO02 does? CO01 is for creating production orders so what sense does it make to have it display mode only?
Maybe your goal is to stop then end user changing the component assignment that is automatically detected by the system. If so, personally I think a better starting point would be PP configuration or user authorizations rather than looking to change the screen by whatever method. As we don't know what you are trying to achieve it's hard to offer much more advice maybe all you need is to change transaction to CO02 -
ALV Report - Selection screen information should appear in Output screen
Hi experts,
I am working on ALV Reports.
I want selection screen information to appear in ouputscreen when report executed.
Those who know the sloution pls tell me as soon as possible.
regards,
ImranHi Imrangs ,
Ur requirement is not clear -
if u want ur selection screen and the output screen on the same screen, i.e if u fill ur selection options with input and press the button then ur ALV will display on the same screen. For this try to use Screen painter, it will get resolved.
http://www.kodyaz.com/articles/sap-abap-tutorial-alv-grid-cl_gui_alv_grid-screen-painter.aspx
chreers
Regards
Neha
Maybe you are looking for
-
please help me, my blackberry curve has been working perfectly fine (everything network and wifi connection are working great) since i got it but all of the sudden when i connect to our wifi at home i noticed that the wifi logo on the upper screen is
-
Is old 845E Max the same as 845E Max (HT ready)?
Hi:) I've got MSI 6566 845E Max mainboard. But the only mainboard i found on http://www.msi.com.tw is 845E Max (HT ready). Can i use driver, firmware etc updates if they r for 845E Max (HT ready) to my mainboard? And finally, can i mount a Intel HT p
-
IPM 11g Picklist based on database lookup
Is there a way with IPM 11g to create a picklist based on a database lookup? If so how?
-
Hardware Information: iMac (24-inch, Early 2008) iMac - model: iMac8,1 1 3.06 GHz Intel Core 2 Duo CPU: 2 cores 2 GB RAM Video Information: NVIDIA GeForce 8800 GS - VRAM: 512 MB System Software:
-
I have been working hard on making a book in the Lightroom 5 book module for the past 6 months. I am close to being finished, and am doing my final edits. Suddenly, my book is only appearing as a 2 page blank book under the same heading, and has no