Unable to have field in selection screen of Infopackage
Hello Gurus,
I have a small problem,
I am unable to bring on field in selection screen in Infopackage,
even thou the object is ticket in DataSources selection option,
I have noted that the object is of type DEC is it something to do with,
Or is their any other way to have this object in selection screen of Infopackage,
Please help me on this,
Thanks & Regards,
Bhanu its field type is DEC thats why its not coming in selection screen in Infopackage .This is a big problem in our Development as this field is SPRIO(Procurement Priority) and we want to restrict this field with conduction SPRIO EQ 1.
Our DataSource is based on Infoset , Bhanu is it possible to restrict this Field in Infoset writing some code. As their is option in Infoset for CODE we tried this but didnt work.
or any other way to restrict this field with 1.
I really appreciate your reply.
Thanks Once again.
Similar Messages
-
Field Validation for Authorization Object field on selection screen
Hi Experts,
We have included a new field u2018Authorization Objectu2019 in the selection screen which should be reflected in the field Authorization Object of the spool property. Please let us know how we can provide F4 help for this field and also validate it in the code.
The data element "RSPOAUTH" is used for the field on selection screen parameter. However, as there is no value table attached to the domain, we are unable to provide any F4 help and hence cannot validate the field in the code.
Looking forward for your valuable reply.
Thanks in advance.
--Warm Regards,
Prajakta Kanitkar.Hi Prajakta,
You can refer the following code for getting F4 help.
TYPES: BEGIN OF stru_btc,
zesgbtc TYPE zhr_del_btc,
END OF stru_btc.
DATA: it_btc TYPE STANDARD TABLE OF stru_btc
SELECT-OPTIONS: s_zzbtc FOR pa0001-zzbtc NO INTERVALS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zzbtc-low.
SELECT * FROM zbtc INTO CORRESPONDING FIELDS OF TABLE it_btc.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BTC'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_ZZBTC'
value_org = 'S'
TABLES
value_tab = it_btc
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.
Hope this will help you.
Thanks & Regards.
Aniruddha -
Unable to retreive values from selection screen built using WDR_SELEC_OPTIO
Hi All,
I have created a selection screen as below
lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
* ASSIGN lr_field->* TO <fs_range>.
* ls_date-sign = 'I'.
* ls_date-option = 'EQ'.
* ls_date-low = 'US'.
* APPEND ls_date TO <fs_range>.
* Add the select-option to the group
wd_this->m_handler->add_selection_field(
i_id = 'FLOW'
i_within_block = 'PROC'
i_no_intervals = abap_true
it_result = lr_field ).
If i enter some value and click a button to retireve the values as below
DATA
lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
types: ty_flow type range of yfmtflow.
FIELD-SYMBOLS:
<fs_sel_item> LIKE LINE OF lt_sel_item,
<fs_process> TYPE yfmtprocess,
<fs_flow> TYPE ty_flow.
* Get the selection-screen items
l_handler->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Retrieve the values from the select-options items
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PROCESS`.
ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
WHEN 'FLOW'.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
ENDCASE.
ENDLOOP.
<fs_flow> is empty
but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
Is it the standard functionality ,if yes how can we overcome
Thanks
Bala DuvvuriAm giving clear coding of select options.
nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID FIELD,
FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
REQUIRED VIEW
Data: lt_range_table type ref to data,
read_only type abap_bool.
WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
>WD_CPIFC_SELECT_OPTIONS( ).
WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
>INIT_SELECT_SCREEN( ).
WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
I_DISPLAY_BTN_CANCEL = ABAP_FALSE
I_DISPLAY_BTN_CHECK = ABAP_FALSE
I_DISPLAY_BTN_RESET = ABAP_FALSE
I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
LT_RANGE_TABLE = WD_THIS->M_HANDLER-
>CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'S_CARR_ID'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY ).
BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
USING SELECTI OPTIONS VALUES)
fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
CONTEXTB---FLIGHT NODE )
***THEN BELOW CODE
DATA: RT_CARRID TYPE REF TO DATA.
DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
RT_CARRID = WD_THIS-> M_HANDLER-
>GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
ASSIGN RT_CARRID-> TO <FS_CARRID>.*
SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ). -
How to make a field in selection screen as READ_ONLY !!
Hi,
How to make a field in selection screen as READ_ONLY !!.
Thanks,
SenthilThis is the code you need to have in your program.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'MYSELFLD'.
SCREEN-INPUT = 0.
MODIFY-SCREEN.
ENDIF.
ENDLOOP. -
Grey out fields in selection screen
experts help needed
i want to display in the selection screen like this
sales org k918
doc type zior
divison 10
distribution channel 20
file name /info/ordersinfo/india/incomming/order/order.txt
1) i want all the sales org ,doc type ,division,dis channel to be greyed out in the selection screen
2)file name : the path i have mentioned is the application server path where my text file
order.txt will be there.
this i want the user to type this text and also i need to display this as default value.
i tried like this
parameters : p_file type string default /info/ordersinfo/india/incomming/order/order.txt.
it is giving error. Please help me how to do thisHi,
Try like below:parameters : p_file type string default '/info/ordersinfo/india/incomming/order/order.txt.' obligatory.
and then in order to grey out your other fields
at selection-screen output.
Loop at screen.
if screen-name = 'SALES ORG'. <<<Name of the parameter that you have declared
screen-input = 0.
modify screen.
endloop.
Similarly you can do for other fields too.
Regards,
Himanshu -
How to add Material type(MTART) field on Selection screen of MB5B transaction code.
Hi All,
Please let me know how to add material type field on selection screen of MB5B transaction
For that i made copy ZMB5B_COPY of original report RM07MLBD.
Thanks in adv .
SamadhanHi,
Once you copied the standard report to Z report, you can MTART in selection screen like below.
and in order to inlcude the same in programming logic, we have three option.
1) Check all related select queries, and include MTART in SELECT query using inner join with MARA.
2) In START-OF-SELECTION event fill MATNR as shown below.
3) If user entered any value in MTART, then before displaying the report just check material type of each material in the final internal table(which is used to display report) delete enteries from internal table accordingly.
START-OF-SELECTION.
IF MTART[] IS NOT INITIAL AND MATNR[] IS INITIAL.
SELECT MATNR FROM MARA INTO MATNR-LOW WHERE MTART IN MTART.
MATNR-OPTION = 'EQ'.
MATNR-SIGN = 'I'.
APPEND MATNR.
CLEAR MATNR.
ENDSELECT.
ENDIF.
The above option has one limitation: The selection screen variables has some restriction, please read the below thread.
Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S
Getting Dump in the select query has more than 2000 entries
Hope this will work for you .
regards,
Rajesh Sadula. -
How to hide input fields on selection screen using variant attribute
Hello all,
I want to know how to hide input fields on selection screen using variant attribute conpletely.
As you know, when setting the attribute of variant "Hide field" checked, the field is temporarily hidden, but when clicking "All Selections(F7)" button on the selection screen, the fileds become appeared.
I want to hide the field completely. Di you know how to do ?
Thank you for your support.
Regards,
Hideki KozaiUse this attribute hide field and save the variant. Then create transaction for this program setting default variant for parameter Start with variant . The user who runs it will have it by defualt set.
Otherwise
in PBO simply use LOOP at screen and output = 0 for this field. This will ensure that field is invisible in any case.
Regards
Marcin -
Query regarding F4 help on a field in Selection Screen.
Hi all,
I am trying to attach a F4 help on a field in Selection Screen.
The code fragment I wrote for this purpose is:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR m_cbu.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'CBU_MANAGER'
PVALKEY = ' '
DYNPPROG = sy-cprog
DYNPNR = sy-dynnr
DYNPROFIELD = 'M_CBU'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = tb_cbu_m
FIELD_TAB =
RETURN_TAB = t_return
DYNPFLD_MAPPING =
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.
Still, I am unable to get any F4 help?
Please point out the mistake..
Thanks in advance.Hi Thien,
My entire code is as follows-
TYPES:
BEGIN OF cbu_m,
cbu_manager TYPE uname,
END OF cbu_m.
DATA:
tb_cbu_m TYPE TABLE OF cbu_m,
wa_cbu_m TYPE cbu_m.
wa_cbu_m-cbu_manager = '123'.
APPEND wa_cbu_m TO tb_cbu_m.
wa_cbu_m-cbu_manager = '234'.
APPEND wa_cbu_m TO tb_cbu_m.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR m_cbu.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'CBU_MANAGER'
PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'M_CBU'
STEPL = 0
WINDOW_TITLE = 'ABC'
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
display = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = tb_cbu_m
FIELD_TAB =
return_tab = t_return
DYNPFLD_MAPPING =
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.
Here I am getting the same message "No Values Found"..
Please point out the mistake in my code. -
Add custom fields on selection screen and ouput in Transaction QM11
Hi All,
i have the requirement to enhance the transaction qm11( Report : RQMELL10) to add the custom fields on the report selection screen and in the report output.
i tried to add the fields on selection screen by copy the standard program RQMELL10 to custom one. and tried to add the fields above to the coding tab but i am not able to display the text for those fields of select-options. can any one help me is it the right way to copy the standard program to custom program and adding the custom fields and how to get the text element for the custom fields which we are going to add it. i tried to add the text element in program text elements but it is not appering on the report.
please requeting the help asap if it is possible.Have a glance in below thread.
Enhancing transaction QM10
Also, there are some more threads available in enhancing the QM10 / QM11. Please search those as well. -
Restrict values for F4 on field in Selection-screen
Hi,
For f4 on particular field I am getting list of values. These values are fixed in Value Range of DOMAIN of that field. There are 26 values fixed for that DOMAIN. Now what I need is I need to restrict 26th value from displaying on F4 for that field in selection screen.
I tried doing it in AT SELECTION SCREEN OUTPUT event using F4_ON_VALUE REQUEST FM, fetching data and deleting 26th entry , but before i delete it, It shows all values in selection-screen.
Please any one guide me.
Thanks,
Vanitha PYou have to use AT SELECTION-SCREEN ON VALUE-REQUEST event.
Tables:mara.
TYPES :BEGIN OF gty_mtart,
mtart TYPE mara-mtart,
END OF gty_mtart.
DATA: gt_mtart TYPE STANDARD TABLE OF gty_mtart,
gtt_mtart TYPE gty_mtart.
DATA: gt_return_tab TYPE TABLE OF ddshretval,
gwa_return_tab TYPE ddshretval.
SELECT-OPTIONS:so_mtart FOR mara-mtart.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_mtart-low.
REFRESH gt_mtart.
gtt_mtart-mtart = 'Z01'.
APPEND gtt_mtart TO gt_mtart.
gtt_mtart-mtart = 'Z02'.
APPEND gtt_mtart TO gt_mtart.
gtt_mtart-mtart = 'Z03'.
APPEND gtt_mtart TO gt_mtart.
gtt_mtart-mtart = 'Z04'.
APPEND gtt_mtart TO gt_mtart.
gtt_mtart-mtart = 'Z05'.
APPEND gtt_mtart TO gt_mtart.
gtt_mtart-mtart = 'Z06'.
APPEND gtt_mtart TO gt_mtart.
gtt_mtart-mtart = 'Z90'.
APPEND gtt_mtart TO gt_mtart.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'SO_MTART-LOW'
* PVALKEY = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* IMPORTING
* USER_RESET =
TABLES
value_tab = gt_mtart
* FIELD_TAB =
return_tab = gt_return_tab
* DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc = 0 AND gt_return_tab IS NOT INITIAL.
CLEAR gwa_return_tab.
READ TABLE gt_return_tab INTO gwa_return_tab INDEX 1.
IF sy-subrc = 0 AND gwa_return_tab-fieldval IS NOT INITIAL.
so_mtart-low = gwa_return_tab-fieldval.
ENDIF.
ELSEIF sy-subrc <> 0.
REFRESH gt_return_tab. CLEAR: gwa_return_tab.
ENDIF. -
Setting only the TO field on the Created on Field in Selection screen to Current date
Hello,
We have a requirement to Set only the To date in the Created on Field in Selection screen to the Current date, I have tried through Dynamic variable option to set the Date calculation but I am able to see Options to set the Current date to From or From and To Created on Date fields instead of setting the Current date only to To created on Field.
We are in 4.7 and are not supported with user defined variables, Appreciate your inputs on this.
Thanks and Regards
Mohammed Roshan>
sunitha j wrote:
> Hi ,
>
> It would br gr8..if u could give some more info about the usage of this class..i mean if i hav to implement it in my program....wat is the necessary data that needs to b copied...
>
> Thanx,
> Sunitha
what Text field you want to change.
Since you are working with Dynpros , you have to split the screen in two parts, and one for the Showing differenet fonts and other your normal Dynpro information.
you need to use the Method ADD_TEXT Did you check the program DD_STYLE_TABLE. -
Month/year input field in selection screen
Hi,
Can anyone tell how to declare an input field in selection screen in the format month/year with out day.
Thanks.
Prasad.hi ,
I have the same doubt ,
but its taking invalid input also as in if i enter 13/2006
Can it be avoided,
also can the calender be displayed at F4 on such field.
Thanks in advance
Regards
Bijal -
Adding fields on selection screen dynamically
Hi all,
Can we add some fields to selection screen dynamically on pushbutton click?
Regards,
Dnyaneshjust have look below code
REPORT zrsdvsr1
LINE-SIZE 220
LINE-COUNT 65(5).
TYPE-POOLS : slis.
TABLES
TABLES: vbak.
DATA DECLARATIONS
Ranges
RANGES: r_posnr FOR vbap-posnr.
DATA: BEGIN OF t_veramt OCCURS 0,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
netwr TYPE vbap-netwr,
mwsbp TYPE vbap-mwsbp,
END OF t_veramt.
DATA: BEGIN OF t_disamt OCCURS 0,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
netwr TYPE vbap-netwr,
mwsbp TYPE vbap-mwsbp,
netwr_v TYPE vbap-netwr,
mwsbp_v TYPE vbap-mwsbp,
disc_val TYPE vbap-mwsbp,
END OF t_disamt.
*& ALV FIELDS
DATA : alv_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
alv_layout TYPE slis_layout_alv.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_ver RADIOBUTTON GROUP g1 USER-COMMAND rad DEFAULT 'X',
p_sab RADIOBUTTON GROUP g1 .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln NO INTERVALS MODIF ID gr1.
PARAMETERS: p_dwfile TYPE rlgrap-filename
DEFAULT 'C:\test1.txt' MODIF ID gr2, "#EC NOTEXT
p_upfile TYPE rlgrap-filename
DEFAULT 'C:\test.txt' MODIF ID gr3. "#EC NOTEXT
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_upfile.
**************F4 Help For Input File Name****************************
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'C:\'
IMPORTING
file_name = p_upfile.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dwfile.
**************F4 Help For Input File Name****************************
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'C:\'
IMPORTING
file_name = p_dwfile.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_sab = 'X'.
IF screen-group1 = 'GR1' OR screen-group1 = 'GR2'.
screen-active = '0'.
screen-invisible = '1'.
ELSE.
screen-active = '1'.
screen-invisible = '0'.
ENDIF.
MODIFY SCREEN.
ELSE.
IF screen-group1 = 'GR3'.
screen-active = '0'.
screen-invisible = '1'.
ELSE.
screen-active = '1'.
screen-invisible = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION
START-OF-SELECTION.
Check Radio Button
IF p_ver = 'X'.
PERFORM get_details_open_so_vertex.
ELSE.
PERFORM get_details_open_so.
ENDIF.
Display the output.
PERFORM diplay_report .
regards
vinod -
F4 for field at selection screen
Hi all.
I have a field at selection screen without any standard F4 on it.
SELECT-OPTIONS: S_EXCMSG FOR T458A-AUSKT. "Exception message
How can I implement F4 for this field?
Thanks,
RebekaHi,
Try using the FM " F4IF_INT_TABLE_VALUE_REQUEST "
A Sample Examle:
REPORT Z_TEST_F4_HELP.
TABLES: ZEMPLOYEE,MARA.
DATA: BEGIN OF ITAB OCCURS 0,
ENO LIKE ZEMPLOYEE-ENO,
ENAME LIKE ZEMPLOYEE-ENAME,
EAGE LIKE ZEMPLOYEE-EAGE,
SALARY LIKE ZEMPLOYEE-SALARY,
END OF ITAB.
PARAMETERS: P_ENO LIKE ZEMPLOYEE-ENO,
P_MATNR LIKE MARA-MATNR.
TYPES: BEGIN OF ts_mara,
matnr TYPE matnr,
ersda TYPE ersda,
ernam TYPE ernam,
END OF ts_mara.
DATA : lt_mara TYPE TABLE OF ts_mara.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR ERSDA ERNAM FROM MARA INTO TABLE LT_MARA UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MATNR'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = LT_MARA
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
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.
Regards,
Ruthra -
How can I add a new field in selection screen for this report
*& Report ZGS_BARKODLA_HIZLI_GIRIS
report zgs_barkodla_hizli_giris.
tables: mara,
mseg,
mch1,
*mch1,
mkpf,
mchb ,
makt.
type-pools: esp1.
data: i_message_tab type esp1_message_tab_type,
wa_message_tab type esp1_message_wa_type ,
sc_count type i.
ALV
type-pools: slis, kkblo.
data: gs_layout type slis_layout_alv ,
gt_fldcat type slis_t_fieldcat_alv with header line,
gt_header type slis_t_listheader with header line,
gt_sortin type slis_t_sortinfo_alv with header line,
g_repid like sy-repid .
define add-fieldcat.
gt_fldcat-fieldname = &1.
gt_fldcat-ref_tabname = &2.
gt_fldcat-seltext_s = &3.
gt_fldcat-seltext_m = &3.
gt_fldcat-seltext_l = &3.
gt_fldcat-reptext_ddic = &3.
gt_fldcat-ddictxt = 'M'.
append gt_fldcat.
clear gt_fldcat.
end-of-definition.
types: begin of titab,
sel type xfeld,
matnr type matnr,
maktx type maktx,
charg type charg_d,
menge type menge_d,
erfmg type erfmg,
end of titab.
data : witab type titab.
data : itab type table of titab.
data : ok_code type sy-ucomm.
controls: tc_itab type tableview using screen 0100.
data: gv_header like bapi2017_gm_head_01,
gv_code like bapi2017_gm_code.
BAPI export parameters
data: gv_headret type bapi2017_gm_head_ret,
gv_matdoc type bapi2017_gm_head_ret-mat_doc,
gv_matyear type bapi2017_gm_head_ret-doc_year.
data : lv_objek like inob-objek .
data : ls_inob like inob .
data : imseg type ty_t_mseg.
data : wmseg type mseg.
data : answer.
data : count type i.
data : v_atinn type atinn.
BAPI movement details
data: i_goodsmvt_items type bapi2017_gm_item_create occurs 0
with header line.
data: i_return type bapiret2 occurs 0 with header line.
start-of-selection.
call function 'CONVERSION_EXIT_ATINN_INPUT'
exporting
input = 'Z_ORAN'
importing
output = v_atinn.
call screen 100.
*& Module status_0100 OUTPUT
module status_0100 output.
set pf-status '100'.
set titlebar '100'.
mseg-werks = 1000.
mseg-umwrk = 1000.
**added
sc_count = sc_count + 1.
if sc_count eq 1.
mseg-bwart = 313.
endif.
mkpf-budat = sy-datum.
**added
describe table itab lines tc_itab-lines.
endmodule. " status_0100 OUTPUT
*& Module user_command_0100 INPUT
module user_command_0100 input.
data field(20).
data: line_t like sy-index.
data: lines like sy-index.
data line_count like sy-loopc.
data: begin of cols,
screen like screen,
index type i,
selected(1) type c,
vislength like icon-oleng,
invisible(1) type c,
end of cols.
case ok_code.
when 'DELE'.
delete itab where sel eq 'X'.
when 'ENTE'.
check *mch1-charg is not initial.
read table itab into witab with key charg = *mch1-charg.
if not sy-subrc is initial.
witab-charg = *mch1-charg.
select single matnr from mch1 into witab-matnr
where charg eq witab-charg.
if not syst-subrc is initial.
set cursor field '*MCH1-CHARG'.
message e115(12) with *mch1-charg.
endif.
select single maktx from makt into witab-maktx
where matnr eq witab-matnr
and spras eq syst-langu.
witab-erfmg = 1.
concatenate witab-matnr witab-charg into lv_objek .
clear ls_inob .
select single * into ls_inob
from inob
where objek = lv_objek and
klart = '023' and
obtab = 'MCH1' .
select single atflv from ausp into witab-menge
where objek = ls_inob-cuobj and
klart = '023' .
append witab to itab.
**added
clear *mch1-charg.
**added
endif.
when 'SAVE'.
if mkpf-budat is initial.
set cursor field 'MKPF-BUDAT'.
message e055(00).
endif.
if mseg-lgort is initial.
set cursor field 'MSEG-LGORT'.
message e055(00).
endif.
if mseg-umlgo is initial.
set cursor field 'MSEG-UMLGO'.
message e055(00).
endif.
if mseg-bwart is initial.
set cursor field 'MSEG-BWART'.
message e055(00).
endif.
refresh imseg.
loop at itab into witab.
move-corresponding witab to wmseg.
append wmseg to imseg.
endloop.
call function 'ZMM_POPUP_WITH_DATA'
exporting
imseg = imseg
importing
answer = answer.
if answer eq 'Y'.
perform create_goods_movement.
endif.
when 'P--'.
clear ok_code.
perform paging using 'P--'.
set cursor field 'MARA-MATNR' line 1.
when 'P-'.
clear ok_code.
perform paging using 'P-'.
set cursor field 'MARA-MATNR' line 1.
when 'P+'.
clear ok_code.
clear lines.
perform paging using 'P+'.
set cursor field 'MARA-MATNR' line 1.
when 'P++'.
clear ok_code.
perform paging using 'P++'.
set cursor field 'MARA-MATNR' line 1.
when 'SORA'.
read table tc_itab-cols into cols with key selected = 'X'.
if sy-subrc is initial.
field = cols-screen.
field = field+5(10).
sort itab ascending by (field).
endif.
when 'SORZ'.
read table tc_itab-cols into cols with key selected = 'X'.
if sy-subrc is initial.
field = cols-screen.
field = field+5(10).
sort itab descending by (field).
endif.
when 'PRNT'.
perform write_alv.
endcase.
endmodule. " user_command_0100 INPUT
*& Module read_table OUTPUT
module read_table output.
mara-matnr = witab-matnr.
makt-maktx = witab-maktx.
mch1-charg = witab-charg.
mseg-menge = witab-menge.
mseg-erfmg = witab-erfmg.
line_count = sy-loopc.
endmodule. " read_table OUTPUT
*& Module write_table INPUT
module write_table input.
witab-matnr = mara-matnr.
witab-maktx = makt-maktx.
witab-charg = mch1-charg.
witab-menge = mseg-menge.
witab-erfmg = mseg-erfmg.
modify itab from witab index tc_itab-current_line.
endmodule. " write_table INPUT
*& Module exit INPUT
module exit input.
leave to screen 0 .
endmodule. " exit INPUT
*& Form create_goods_movement
form create_goods_movement .
clear : gv_header, i_return[], i_goodsmvt_items[].
gv_header-doc_date = gv_header-pstng_date = mkpf-budat.
gv_header-pr_uname = sy-uname.
GM with reference to reservation
loop at itab into witab.
i_goodsmvt_items-material = witab-matnr.
i_goodsmvt_items-entry_qnt = witab-erfmg.
i_goodsmvt_items-entry_uom = 'ST'.
i_goodsmvt_items-move_type = mseg-bwart.
i_goodsmvt_items-plant = mseg-werks.
i_goodsmvt_items-stge_loc = mseg-lgort.
i_goodsmvt_items-move_plant = mseg-umwrk.
i_goodsmvt_items-move_stloc = mseg-umlgo.
i_goodsmvt_items-batch = witab-charg.
append i_goodsmvt_items.
endloop.
find BAPI processing transaction
if gv_code is initial.
perform determine_bapi_code using mseg-bwart
changing gv_code.
endif.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gv_header
goodsmvt_code = gv_code
importing
goodsmvt_headret = gv_headret
materialdocument = gv_matdoc
matdocumentyear = gv_matyear
tables
goodsmvt_item = i_goodsmvt_items
return = i_return[].
cancel blocking process
loop at i_return where type eq 'E' or type eq 'A' or type eq 'X'.
exit.
endloop.
if sy-subrc ne 0.
refresh i_message_tab.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wa_message_tab-msgid = 'M7'..
wa_message_tab-msgty = 'S'.
wa_message_tab-msgno = '060'.
wa_message_tab-msgv1 = gv_matdoc.
wa_message_tab-msgv2 = ''.
wa_message_tab-msgv3 = ''.
wa_message_tab-msgv4 = ''.
append wa_message_tab to i_message_tab.
else.
refresh i_message_tab.
call function 'BAPI_TRANSACTION_ROLLBACK'.
write a message as there is an unexpected error.
loop at i_return.
wa_message_tab-msgid = i_return-id.
wa_message_tab-msgty = i_return-type.
wa_message_tab-msgno = i_return-number.
wa_message_tab-msgv1 = i_return-message_v1.
wa_message_tab-msgv2 = i_return-message_v2.
wa_message_tab-msgv3 = i_return-message_v3.
wa_message_tab-msgv4 = i_return-message_v4.
append wa_message_tab to i_message_tab.
endloop.
endif.
call function 'C14Z_MESSAGES_SHOW_AS_POPUP'
tables
i_message_tab = i_message_tab.
endform. " create_goods_movement
*& Form determine_bapi_code
form determine_bapi_code using p_bwart type bwart
changing p_code type bapi2017_gm_code.
data: lt_t158b type table of t158b with header line.
clear p_code.
select tcode from t158b into corresponding fields of table lt_t158b
where bwart eq p_bwart.
loop at lt_t158b.
select single gmcode from t158g into p_code
where tcode eq lt_t158b-tcode.
if sy-subrc is initial.
exit.
endif.
endloop.
endform. " determine_bapi_code
*& Form paging
form paging using code.
data: i type i,
j type i.
case code.
when 'P--'. tc_itab-top_line = 1.
when 'P-'.
tc_itab-top_line = tc_itab-top_line - line_count.
if tc_itab-top_line le 0.
tc_itab-top_line = 1.
endif.
when 'P+'.
i = tc_itab-top_line + line_count.
j = tc_itab-lines - line_count + 1.
if j le 0.
j = 1.
endif.
if i le j.
tc_itab-top_line = i.
else.
tc_itab-top_line = j.
endif.
when 'P++'.
tc_itab-top_line = tc_itab-lines - line_count + 1.
if tc_itab-top_line le 0.
tc_itab-top_line = 1.
endif.
endcase.
endform. " paging
*& Form write_alv
form write_alv .
perform find_list_header.
perform fill_field_cat.
perform fill_sortinfo.
g_repid = sy-repid.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
answer = 'Y'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_buffer_active = ''
i_callback_program = g_repid
i_save = 'A'
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = gs_layout
it_fieldcat = gt_fldcat[]
it_sort = gt_sortin[]
tables
t_outtab = itab[].
endform. " write_alv
Form find_list_header
form find_list_header.
data : v_datum(10),
v_datlo(10),
v_dathi(10),
v_uzeit(8).
clear: gt_header, gt_header[].
gt_header-typ = 'H'.
gt_header-info = sy-title.
append gt_header.
clear gt_header.
gt_header-typ = 'S'.
gt_header-key = 'Çalıştırma Zamanı : '.
write syst-datum to v_datum.
write syst-uzeit to v_uzeit.
concatenate v_datum '/' v_uzeit into gt_header-info.
append gt_header.
endform. " find_list_header
Form fill_field_cat
form fill_field_cat.
refresh gt_fldcat.
clear gt_fldcat.
gt_fldcat-key = 'X'.
add-fieldcat 'MATNR' 'MARA' ''.
add-fieldcat 'MAKTX' 'MAKT' ''.
add-fieldcat 'CHARG' 'MSEG' ''.
gt_fldcat-do_sum = 'X'.
add-fieldcat 'MEINS' 'MARA' 'Olcu Birimi '.
gt_fldcat-do_sum = 'X'.
add-fieldcat 'ERFMG' 'MSEG' 'Adet'.
endform. " fill_field_cat
Form fill_sortinfo
form fill_sortinfo.
gt_sortin-up = 'X'.
gt_sortin-fieldname = 'MATNR'. append gt_sortin.
endform. " fill_sortinfo
Form top_of_page *
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ZKUTAS'
it_list_commentary = gt_header[].
endform. " top_of_pageHI,
if it is a normal report program then you can directly create a Selection screen field.
After the Type-pool you can use Parameters or Select-options to create the selection screen field..
If it is a Modulpool program then you can create a selection scren field like
SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
PARAMETERS: p1(10) TYPE c.
SELECTION-SCREEN END OF SCREEN 1100.
defines a selection screens 1100 as subscreens.
The next screen number of screen 100 is 100 (statically-defined).
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN area INCLUDING sy-repid number.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
CALL SUBSCREEN area.
MODULE user_command_0100.
look at the below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
Regards
Sudheer
Maybe you are looking for
-
Urgent!! Issue in using Generic Object Services (GOS)
Hello Friends, I have created a GOS Business object and i am using this to attach documents at the selection screen of my programs. The implementation is successfull and working fine. When i execute my program, i can see the GOS Toolbar, i am able to
-
How does nocycle in connect by work?
hello there is a table t that defines parent-child relation: p | c | 6 | 4 | 5 | 4 | 4 | 5 | 4 | 6 |with this query: select level l, p, c, connect_by_iscycle cycle, connect_by_root p root_p, connect_by_root c root_c from t connect by nocycle prior c
-
[SOLVED] Trouble With Age of Empires 2 / Conquerors in Wine
As the title indicates I'm trying to install and run Age of Empires 2 and the expansion Conquerors, with Wine. Looks like it should work: http://appdb.winehq.org/objectManager.p … n&iId=4184 So first I installed wine and the video driver like this...
-
GR and GR reversal amount not same
Hi, I'm using SAP ECC 6.0. The sequence of my posting: PO Price = 1.32 / kg Material Master = using standard price S Transaction Quantity (KG) Unit price (USD) Value (USD) 1 IR receipt 1,320.00 50
-
High CPU Usage - Satellite Pro L450 EZ-1510
Hello and thanks for reading. I am having a problem with my laptop that started a bit over a week ago. The CPU usage is very high, most of the time. I have tried a variety of things from updates to Windows and drivers, to security scans from various