Problem in Passing the select-options data in smartforms
Dear ABAPers,
I have developed new layout for Delivery Chellan using smartforms.
using parameters i am getting document no, corresponding all details getting print.
but the client wants to use multiple document no.
in function module also i am passing only one import parameter (i.e. doc.no).
my requirement is how to pass multiple data in smartfroms.
Thanks & Regards,
Ashok
Dear ABAPers,
Here i give my code Please check it out and tell me where i am going wrong.
*& Report ZMM_DC_FORM *
REPORT ZMM_DC_FORM .
Data Declaration
tables : mseg,
mkpf,
ekpo,
ekko,
objk,
mbew,
ser03,
twlad,
makt,
adrc.
data : begin of struct_mblnr,
mblnr type mblnr,
end of struct_mblnr.
data : it_mblnr like table of struct_mblnr with header line.
data : begin of i_struct,
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
matnr like mseg-matnr,
erfmg like mseg-erfmg,
werks like mseg-werks,
lgort like mseg-lgort,
ebeln like mseg-ebeln,
ebelp like mseg-ebelp,
umwrk like mseg-umwrk,
end of i_struct.
data : begin of bednr_struct,
matnr type ekpo-matnr,
bednr type ekpo-bednr,
end of bednr_struct.
data : begin of price_struct,
matnr type mseg-matnr,
verpr type mbew-verpr,
stprs type mbew-stprs,
end of price_struct.
data : begin of serial_struct,
matnr like objk-matnr,
sernr like objk-sernr,
end of serial_struct.
data : begin of fi_struct,
matnr type mseg-matnr,
maktx type makt-maktx,
bednr type ekpo-bednr,
erfmg type mseg-erfmg,
verpr type mbew-verpr,
val_p type mbew-verpr,
end of fi_struct.
data : it_tab like table of i_struct with header line.
data : it_add1 type table of adrc with header line,
it_add2 type table of adrc with header line.
data : it_bednr like table of bednr_struct with header line.
data : it_price like table of price_struct with header line.
data : it_ser type table of ZMM_DC_SERIAL with header line.
data : it_final like table of fi_struct with header line.
data : s_date like mkpf-budat.
data : s_ebeln like ekpo-ebeln.
DATA : FM_NAME TYPE RS38L_FNAM.
Selection Screen Variables
selection-screen : begin of block b1 with frame title text-001.
select-options : s_mblnr for mseg-mblnr.
parameters : s_mjahr type mseg-mjahr.
selection-screen : end of block b1.
Start of Selection
start-of-selection.
select mblnr from mseg into table it_mblnr where mblnr ge s_mblnr-low
and mblnr le s_mblnr-high.
delete adjacent Duplicates from it_mblnr.
*loop at it_mblnr.
*write : it_mblnr-mblnr.
*endloop.
loop at it_mblnr.
select mblnr
mjahr
matnr
erfmg
werks
lgort
ebeln
ebelp
umwrk from mseg into table it_tab where mblnr = it_mblnr-mblnr
and mjahr = s_mjahr
and xauto <> 'X'.
read table it_tab index 1.
*code for PO Number
s_ebeln = it_tab-ebeln.
*code for Supplying plant address
select single adrnr from twlad into twlad-adrnr where werks = it_tab-werks
and lgort = it_tab-lgort.
select single * from adrc into it_add1 where addrnumber = twlad-adrnr.
clear twlad-adrnr.
*code for receiving plant address
select single lgort from ekpo into ekpo-lgort where ebeln = it_tab-ebeln
and ebelp = it_tab-ebelp.
select single adrnr from twlad into twlad-adrnr where werks = it_tab-umwrk
and lgort = ekpo-lgort.
select single * from adrc into it_add2 where addrnumber = twlad-adrnr.
clear : twlad-adrnr,
ekpo-lgort.
*code for the Material Document Date
select single budat from mkpf into s_date where mblnr = it_mblnr-mblnr
and mjahr = s_mjahr.
loop at it_tab.
it_final-matnr = it_tab-matnr.
it_final-erfmg = it_tab-erfmg.
*Code for Material Description
select single maktx from makt into makt-maktx where matnr = it_tab-matnr.
it_final-maktx = makt-maktx.
clear makt-maktx.
*Code for Service order Number
select single matnr
bednr from ekpo into it_bednr where ebeln = it_tab-ebeln
and ebelp = it_tab-ebelp
and matnr = it_tab-matnr.
it_final-bednr = it_bednr-bednr.
*Code for Price for the Material
select single matnr
verpr
stprs from mbew into it_price where matnr = it_tab-matnr
and bwkey = it_tab-werks.
if it_price-verpr <> 0.
it_final-verpr = it_price-verpr.
else.
it_final-verpr = it_price-stprs.
endif.
it_final-val_p = it_final-erfmg * it_price-stprs.
append it_final.
clear it_final.
endloop.
*Code for Serial Number
select single obknr from ser03 into ser03-obknr where mblnr = it_mblnr-mblnr
and vorgang = 'MMSL'.
select matnr
sernr from objk into table it_ser where obknr = ser03-obknr.
clear ser03-obknr.
*Calling Function Module for Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZMM_DC_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION FM_NAME
EXPORTING
L_MBLNR = it_mblnr-mblnr
L_DATE = S_DATE
L_EBELN = S_EBELN
IT_ADD1 = IT_ADD1
IT_ADD2 = IT_ADD2
TABLES
IT_FINAL = IT_FINAL
IT_SER = IT_SER.
endloop.
Please help me to solve this problem.It is very urgent.
Thanks & Regards,
Ashok.
Similar Messages
-
How can we pass the select-option value to modulepool program?
hi,
how can we pass the select-option value to modulepool program ?
Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
How i get select-option values to PAI of call screen for getting the data from database table to my internal table?Oh I thought that you have selection-screen and again you are working on dialog programming.
if you want to use select-option directly in module pool then it is not possible.
but you can do other way.
create two varaiables
data : v_kun_low like kna1-kunnr,
v_kun_high like kna1-kunnr.
use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
use can enter only low value and high value.
when you come to program point of view
declare one range
ranges r_kunnr for kna1-kunnr.
do the coding like
r_kunnr-low = v_kun_low.
r_kunnr-high = v_kun_high.
r_kunnr-options = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
now you can use r_kunnr in select query ,it will work like select-option.
other than this there is no option.
Thanks
Seshu -
How to pass the internal table data to smartforms
Hi Gurus,
I have a problem in passing the internal table data to the smartforms. In the print program
I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = T_SSFCTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = T_SSFCOMPOP
USER_SETTINGS = ' '
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
LT_PRDLBL = LT_PRDLBL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
In the print program I had defined the internal tables like
Data: lt_prdlbl type standard table of zprdlbl.
Data: Begin of lt_prdlbl1 occurs 0.
include structure zprdlbl.
Data: End of lt_prdlbl1.
How do I define the internal table in the smartform to get the values printed in the smartform?.
<REMOVED BY MODERATOR>
Thanks,
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PMNehal,
Thanks for quick response.
In the smartform under the Form Interface->Tables tab
I had defined
LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
In the main window I have created LOOP, in which I have ticked the internal table and
LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
<_PRDLBL-XXXX&.
I am able to get the print but the data is not printing.
Please help me with this.
Thanks, -
Dear all,
Iam trying to print the packing list using smarforms,
T.Code - VL74 - After providing the input for the selection screen,
eg. output_type - 0001.
outbound.deliv - 80000834.
In the "OUTPUT FROM HANDLING UNITS" screen, im getting the list of labels available for that selection.
say for eg.
HU Ob Object key Out. Med Role Name 1 City PkMtT PackMatls
1000004002 01 0080000834 0001 1 WE CALCADOS LTDA BENTO GONCALVES Z001 300026
1000004003 01 0080000834 0001 1 WE CALCADOS LTDA BENTO GONCALVES Z001 300026
1000004005 01 0080000834 0001 1 WE CALCADOS LTDA BENTO GONCALVES Z001 300026
1000004006 01 0080000834 0001 1 WE CALCADOS LTDA BENTO GONCALVES Z001 300026
with the Selection check box attached to the first field, when i
select the first and second HUs, it should be passed to the
driver program, but im getting only one HU value passed into the driver program.
In the driver program my code goes like below,
REPORT ZSDPACKDR LINE-COUNT 100 MESSAGE-ID VV.
TABLES: VBCO3, TVST.
INCLUDE ZPALIDATA_PL.
INCLUDE RVADTABL.
DATA: RETCODE LIKE SY-SUBRC, "Returncode
XSCREEN(1) TYPE C. "Ausgabe Printer/Screen
Internal table for lips
DATA: lips_wa TYPE lips.
DATA: int_lips LIKE lips_wa OCCURS 0 WITH HEADER LINE.
*& Form ENTRY
text
-->RETURN_CODE text
-->US_SCREEN text
FORM ENTRY USING RETURN_CODE US_SCREEN.
CLEAR RETCODE.
XSCREEN = US_SCREEN.
PERFORM PROCESSING USING XSCREEN.
IF RETCODE NE 0.
RETURN_CODE = 1.
ELSE.
RETURN_CODE = 0.
ENDIF.
ENDFORM. "ENTRY
FORM PROCESSING USING PROC_SCREEN.
PERFORM GET_DATA.
CHECK RETCODE = 0.
ENDFORM. "PROCESSING
FORM GET_DATA.
REFRESH: LVBPLK, LVBPLA, int_lips.
CLEAR: LVBPLK, LVBPLA, int_lips.
DATA: FM_NAME TYPE RS38L_FNAM.
VBCO3-VENUM = NAST-OBJKY. "00000.....
VBCO3-SPRAS = NAST-SPRAS. "D
VBCO3-KUNDE = NAST-PARNR. "KUNDE
VBCO3-PARVW = NAST-PARVW. "WE
VBCO3-PACKD = 'X'.
CALL FUNCTION 'SD_PACKING_PRINT_VIEW_SINGLE'
EXPORTING
COMWA = VBCO3
IMPORTING
VBPLK_WA = LVBPLK
VBPLA_WA = LVBPLA
VBADR_TVST = LVBADR "n_916660
TABLES
VBPLP_TAB = LVBPLP
EXCEPTIONS
SHIPPING_UNIT_NOT_UNIQUE = 1
SHIPPING_UNIT_NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
RETCODE = 1.
PERFORM PROTOCOL_UPDATE.
ENDIF.
in the above coding, i used SD_PACKING_PRINT_VIEW_SINGLE', but i tried with SD_PACKING_PRINT_VIEW also, but no values getting loaded in the importing structures. if im doing anything wrong, pls correct me.
*CALL FUNCTION 'SD_PACKING_PRINT_VIEW'
EXPORTING
COMWA = VBCO3
AUFTRAG_NICHT_LESEN = ' '
EXPORTDATEN_NICHT_LESEN = ' '
IMPORTING
VBPLA_WA =
TABLES
VBPLK_TAB = LVBPLK
VBPLP_TAB = LVBPLP
VBPLS_TAB = LVBPLS
EXCEPTIONS
OBJECT_NOT_FOUND = 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.
The problem is:
For any of the above function call,
The VBCO3 itself im getting only one label number, hence it is processing for only one, i want to know how to pass on the multiple
label number to this function call ie, in VBC03.
meaning i would like to know, in which internal table , i can get the list of all the selected HUs, so that i shall loop this function call inorder get the appropriate output.
kindly help me to sort this issues.
Points assured.
regs,
RajaDear Srihari,
I wrote above code in first label(now i deleted do-enddo) only.
first i am moving seven lebels data into seven wa's.
after that reading the first record and moving another itab(for printing at main window i.e. 8 label).
clearly, there is no space problem..because instead puttting all the required field i put only customer name.
Now it is printing well in first page with 8 labels(main window) also.
But in the second Page it displays only 7 labels and not printing rest of the labels.
for example my itab has 20 records it displays 8 labels in first page &
next 7 labels in second page and not print the rest of the 5 labels i.e. it is not calling third page(?).
code..
CLEAR : WA1, WA2, WA3, WA4, WA5, WA6, WA7.
loop at it_final into wa_final FROM 1 TO 7.
if sy-tabix = '1'.
wa1 = wa_final.
elseif sy-tabix = '2'.
wa2 = wa_final.
elseif sy-tabix = '3'.
wa3 = wa_final.
elseif sy-tabix = '4'.
wa4 = wa_final.
elseif sy-tabix = '5'.
wa5 = wa_final.
elseif sy-tabix = '6'.
wa6 = wa_final.
elseif sy-tabix = '7'.
wa7 = wa_final.
endif.
endloop.
delete it_final from 1 to 7.
**Push every 8th row if it_final in it_main
read table it_final into wa_final index 1. "deleting 8th, 16th,... records
if sy-subrc = 0.
append wa_final to it_main.
else.
exit.
endif.
*Delete the rows from it_main which are present in it_final
loop at it_main into wa_final.
delete table it_final from wa_final. "deleting 8 th row from it_final.
endloop.
Edited by: anurag.radha on Jan 6, 2012 1:09 PM -
Reading the select options of selection screen
Hi All,
I have a problem in reading the select options from the selection screen.
I have two select-options on the selection screen. Based on the first select-option value, I need to get the F4 values for the second select-option.
I am using the function module 'RS_REFRESH_FROM_SELECTOPTIONS' for getting the select-options values. But here there is small problem.
This FM is returing the values if i select the multiple values. But if I give a single value in the select-options i.e., If i give only the low value, I am getting the blank entries from the function module.
How can I get the value of the select-option if i give only the low field.
Please help me in this regard.
Regards,
Kishore.Hi,
Try to use FM "DYNP_VALUES_READ"
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = i_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
and after this you can read the internal table i_dynpfields. -
Value help for select options (pass the selected values to the select opt)
Hi everyone,
I created a custom value help for my select options.
It works fine, when the user clicks on the value help, my own view is displayed, and the user can select the required values:
lt_range_table =
wd_this->m_handler->create_range_table(
i_typename = 'ORGEH' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'ORGEH'
i_value_help_id = 'MYSO'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
it_result = lt_range_table
i_read_only = read_only ).
The problem is, how can I pass the values to the select option? When the user selects the values in my view, I have them in an internal table. But how can i pass these values to the select option? I suppose there is declared method for this... but which one?
Thanks
N.Sorry for the stupid question, but it seems I can't acces my attribute:
I create it in the component controller
NODE: 'APP_DATA'
Attribute: M_HANDLER TYPE IF_WD_SELECT_OPTIONS
Cardinality 1..1
Selection 1..1
Singleton = 'X'
I pass the values int he EDOINIT method of MAIN view:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
ls_app_data-m_handler = wd_this->m_handler.
lo_child->bind_structure( ls_app_data ).
After this code I test it if the binding is correct:
DATA: ls_test TYPE wd_comp_controller->element_app_data.
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_test.
The lstest is correct_. It has the reference for the SelectOption
Now, in the SEL_TREE View:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
*Get the data from the node
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_app_data.
wd_this->m_handler = ls_app_data-m_handler.
The ls_app_data-m_handler is INITIAL. There is no value in it.
What did I do wrongly?
Please help
Thanks
N. -
How to pass the selected table row data from popup to source view
Hi ,
I have requirement of passing the data from popup view to source. , searching some data in popup view and displaying in table,
Like i am passing some input and click search button will display the data in table, when select any of the row in the table and click on the another button , i should be able to pass the select row to the source view and also should close the popup.
When i implement , In the popup windiw, when i enter the customer no, and click on search button, it is closing the popup itslef. not able to see the data in popup.
Can u tell me what is that soultion.
Regards
VijayHi Harsimran
Thanks for the reply,
1) Source view
In "Source View" i have input field called Customer_no. But, the end user will not have any idea , what customer no to enter. so i am searching the customer no in the popup view.
1) Customer_no( This is an inputfiled , to get the customer no from the popup view)
2) Get Customer NO( This is a button to call the popup view)
"Get Customer NO" This button action will open the popup view.
In this popup, i have
1) Input field (To enter the search term)
2) Search (To seach the customer no based on the search term)
3) Table ( To display the search data)
4) Button in Table tool bar called "Select" .( To close the popup view after selected the required data in the table to pass it back to the source view).
so in the popup view what happening is, when i click on the search button itself , it is closing the popupview by transfering the first row of the tbale ,with out select the required row in the table.
i need to close the window after click on the "Select" button in the toolbar , after selected the required row data to trasfer in the table.
Can u pelase tell me what are the modifcations i need to do it.
Regards
Vijay -
Since last week or 2 weeks ago, some of our users (both Batam and Singapore) here encountered a problem where they are not able to browse the Internet on their BB as they used to.
Example :
I did a test to browse on their BB
www.cnn.com
they will see below error:
“Unable to connect to the selected mobile data service, please try again later.
If the problem persists please contact your administrator “
However if we use ‘Google’ or ‘Yahoo’ search on the BB and entered ‘CNN’ and run a search on it.
We are able to open the CNN website – from the link result search by Yahoo or Google
It’s also applicable to other websites too.
Any idea?Hi thatemailguy,
Are the users on a BlackBerry Enterprise Server?
Thanks
-CptS
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)! -
How to get all the values in the Select-option.
Hi,
I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week) in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
Regards,
Anbu.Hello,
I will prefer Max's solution. But just for the sake of this req.
i need to get 200923, 200924,200925, 200926
i am proposing my soln:
DATA: V_WEEK TYPE RSCALWEEK.
SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
AT SELECTION-SCREEN.
DATA:
V_COUNT TYPE I,
V_ADD TYPE I,
RT_WEEK TYPE RANGE OF RSCALWEEK,
RS_WEEK LIKE LINE OF RT_WEEK.
V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
DO V_COUNT TIMES.
RS_WEEK-SIGN = 'I'.
RS_WEEK-OPTION = 'EQ'.
RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
CLEAR RS_WEEK.
V_ADD = V_ADD + 1.
ENDDO.
@Max: I was stupid enough not to think of your solution. Need to leave office
Cheers,
Suhas -
How to hide the select-options fields on radiobutton select in webdynpro
hi
Could you please help how to hide the select-option fields in webdynpro
there are four radio buttons
for every radiobutton there is corresponding the select_option filed is associated to it
user as only provision select one radio button and reset of the select-option fileds should be hidden
which ever the radio button is selected corresponding the select-options fileld should be displayed
please find the attachement belowHi Nine,
To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
Sample code :
Write the below code in the Event handler of Radio Button.
DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
Regards,
Ravikiran.k -
How to change the select options selection text dynamically in webdynpro abap ?
I am using standard interface WDR_SELECT_OPTIONS.... i want to change the Selection text dynamically in my select options.I.E. if the select option is for VBELN field than i want to change its description SALES ORDER Number through Code to some other text.
If anyone can please help me in this.Hi,
You can achieve your requirement as below
Get the range table of your selection field as below
data lt_range_table type ref to data.
wd_this->m_handler->GET_RANGE_TABLE_OF_SEL_FIELD(
exporting
i_id = 'VBELN'
receiving
rt_range_table = lt_range_table ).
Update the selection field with new description - 'Your New Text'
wd_this->m_handler->UPD_SELECTION_FIELD(
exporting
I_ID = 'VBELN'
I_DESCRIPTION = 'Your New text'
I_IS_AUTO_DESCRIPTION = abap_false
IT_RESULT = lt_range_table ).
You can also pass the other parameters as per your requirement
Hope this helps you.
Regards,
Rama -
Collective search on the Select-options field on the selection screen
Hello experts,
I have a Y program and a selection screen for it. I have to get the BKPF-BELNR in the search help list. Since the table is too bulky to get all the documents form it. I thought I might need a condition of company code for fetching the documents. I have company code on the selection screen, but if I press F4, on the BELNR, my select-options internal table for <b>company code</b> is remains initial. I think for F4 events the values doesn't get populated in the internal tables, not sure.
Can you tell me, how to get the company code entered on the selection screen, on the F4 event. Or If this doesn't work, will collective search help solve my problem? If yes, Please let me know, which function module I can use to add a collective search to my select-options on the selection screen.
Thanks,
Ganesh Khumse.
Points will be rewarded!Hi
do like this
TYPES : BEGIN OF ST_OBJID_SH,
OTYPE TYPE HRP1000-OTYPE,
OBJID TYPE HRP1000-OBJID,
END OF ST_OBJID_SH.
DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
***********SELECTION SCREEN DESIGN***********************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
**********END OF SELECTION SCREEN DESIGN*****************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
IF S_OBJID IS NOT INITIAL.
SELECT OTYPE OBJID FROM HRP1000
INTO TABLE IT_OBJID_SH
WHERE OTYPE = 'D'.
IF SY-SUBRC EQ 0.
SEARCH HELP FOR QUALIFICATION.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'OBJID'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'S_OBJID'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_OBJID_SH
FIELD_TAB =
RETURN_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.
ENDIF. -
How to pass a SELECT-OPTION to a FUNCTION-MODULE
Hi forum:
How can i pass a selection-option like an input parameter of a function-module?. Put one example in the answer, please.
After pass this value i want to put this into an IN select condition.
But for i only need know how to pass this value
thnks
Josué
Thnks
Josue CruzHi Rich.
this is a little example of my code.
DATA: wa_bukrs TYPE bkpf-bukrs,
wa_budat TYPE bkpf-budat,
wa_gjahr TYPE bkpf-gjahr.
SELECT-OPTIONS: se_bukrs FOR wa_bukrs OBLIGATORY,
se_gjahr FOR wa_gjahr OBLIGATORY,
se_budat FOR wa_budat OBLIGATORY.
HERE i can to put the call to the function.
Thnks -
How to change the select-options fields length to long
Dear friends:
I had develop a program for sent email,and it have a field for fill mail address as below:
data: lmail like adr6-smtp_addr.
select-options: mailadd for lmail no intervals.
my customer complain that the field is too short,but I can not change it to longer,the select-options component limit the visible length , how can i do for this problem!Dear All:
I had realized this function.
I defined a parameter and a pushbutton to replace the select-option componet,
the code share as below.
data: lmail like adr6-smtp_addr.
SELECTION-SCREEN BEGIN OF LINE.
parameters: mailCopy like lmail.
selection-screen:pushbutton 64(5) pubu user-command mailButt.
SELECTION-SCREEN END OF LINE.
select-options: mailadd for lmail NO INTERVALS no-display.
at selection-screen output.
CLEAR l_count.
DESCRIBE TABLE mailadd LINES l_count.
IF l_count > 1.
write ICON_DISPLAY_MORE as icon to pubu.
ELSE.
write ICON_ENTER_MORE as icon to pubu.
ENDIF.
at selection-screen.
CLEAR l_count.
DESCRIBE TABLE mailadd LINES l_count.
IF NOT mailCopy IS INITIAL AND mailadd[] IS INITIAL.
MailAdd-low = mailCopy.
Append mailadd.
ENDIF.
IF l_count = 1 and mailCopy IS INITIAL.
refresh mailadd.
clear mailadd.
endif.
if sy-ucomm = 'MAILBUTT'.
perform show_box.
endif.
* FORM show_box *
FORM show_box.
TYPE-POOLS aqadh .
DATA: tab_and_field TYPE rstabfield.
tab_and_field-tablename = 'ADR6'.
tab_and_field-fieldname = 'SMTP_ADDR'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TEXT = 'SET E-Mail To '
tab_and_field = tab_and_field
TABLES
range = MAILADD
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
OTHERS = 4.
IF NOT MAILADD[] IS INITIAL.
READ TABLE MAILADD INDEX 1.
MAILCopy = MAILADD-LOW.
ELSE.
CLEAR MAILCopy.
ENDIF.
ENDFORM. -
APO : Problem in time stamp select option
Hi All,
I am using a time stamp data elemnt (/SAPAPO/TSUCR) as select option in the selection screen. As the time stamp is a combination of date and time, the user is entering only the date in the selection screen. Say the user is entering data as 27.08.2006, inside the program the select option value is changed to 26.08.2006. We are getting a day less. how can we solve the problem. I had tried using adding a day in the program. Please post your valuable ideas if you had expierience same kind of problem.
Kind Regards,
Vijay DhanasekarHi,
I am not sure if this would be correct.You can change the selection-screen parameter to type 'date' instead of 'timestamp' and convert it into timestamp inside the Program using the FM 'ADDR_CONVERT_DATE_TO_TIMESTAMP'.
Import parameters Value
IV_DATE 2006/09/11
IV_HIGH ' '
Export parameters Value
EV_TIMESTAMP 20060911000000
regards,
Priya.
Message was edited by: Priya Prakash
Maybe you are looking for
-
Safari on iPod touch will no longer open any web pages even after reset.
My iPod touch will no longer open any web pages via Safari. I am connected to WiFi and other apps work fine (mail for example). I connected to Itunes and did a reset - still no luck. S/w is up to date for this version of touch - 4.x. Please help with
-
Mouse position inside a movieclip area
hey i am trying to solve this problem: how can i test the position of the mouse inside the area of a specific movieclip WITHOUT using rollover and rollout events? the movieclip is the irregular shape (star) i need to do some action according to the p
-
Tag files to be invisible in FrontRow
Hi all, Is there a way to somehow tag files to be invisible in FronRow? Thanks, Ziv
-
Guarranteed Message Delivery with OSB 11g
Hi, I'm currently working on a scenario with OSB that requires me to set up guaranteed message delivery. The business scenario is that on one end I have a flat file polling service and I have to transform this data into XML and store it to DB. Concis
-
Can anybody explain me creating Generic Datasource using Function module?
Hi, can anybody explain me creating Generic Datasource using Function module? Thax in advance, Ravi.