BI Input Selection Screen : Pass values
Hi,
I have a requirement where I have to show only those business partners who are assigned to a BP Role entered in another variable of the same selection screen.
If the role is Sold to party I have to show only those busness partners who are assigned to Sold to party.
Please also give me the reference of other threads if you come across any....!
Regards
Joga
Hi Joga,
I wud suggest you to create another query say B to generate the BP number giving input as Sold to Party and create one more variable in your existing say A and through replacement path and input as Query B in Query A.
General Tab of Variable
The Variable in Query A will have the following properties,
1)Processing by Replacement Path
2)Ref Char as the Tech Name of Query A.
In the Replacement Path tab
1)Replace varible with Qurey
2)Query =tech name of Query B
refer this one
https://www.sdn.sap.com/irj/scn/forums
Rgds
SVU123
Similar Messages
-
AT SELECTION-SCREEN ON VALUE-REQUEST FOR not input value in input field
Dear All,
I make search help for field ARBPL in selection screen are not excepted selected value.
Code is
SELECT-OPTIONS: p_arbpl FOR zdmde-arbpl MODIF ID two.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_arbpl-low.
REFRESH sh_arbpl.
SELECT * from crhd into CORRESPONDING FIELDS OF TABLE sh_arbpl.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_ARBPL'
DYNPROFIELD = 'P_ARBPL'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = sh_arbpl.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_arbpl-high.
REFRESH sh_arbpl.
SELECT * from crhd into CORRESPONDING FIELDS OF TABLE sh_arbpl.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_ARBPL'
DYNPROFIELD = 'P_ARBPL'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = sh_arbpl.
Please tell how to input selected field from search help into input field in both low and high.
Would appreciate your reply .
Regards,
PoojaHi Pooja,
For getting the response back from the user selection , please get the return code too. Before that instead of directly using the table crhd structure.. please do create a type declaration of that table , make sure that the field that you wanted to get using search help be specified at last of declaration type like this
TYPES: BEGIN OF ty,
OBJTY TYPE CR_OBJTY,
ARBPL TYPE ARBPL,
END OF ty.
this is because the return parameter t_rtn will holds the last value of type which been selected by user.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_ARBPL'
DYNPROFIELD = 'P_ARBPL'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = sh_arbpl
return_tab = t_rtn.
LOOP AT t_rtn INTO x_rtn .
ENDLOOP.
try executing this code.
TABLES crhd.
TYPES: BEGIN OF ty,
OBJTY TYPE CR_OBJTY,
ARBPL TYPE ARBPL,
END OF ty.
DATA: sh_arbpl TYPE TABLE OF ty.
DATA: dynpfields TYPE TABLE OF DYNPREAD,
x_dynpfields TYPE dynpread,
t_rtn TYPE STANDARD TABLE OF DDSHRETVAL ,
x_rtn TYPE DDSHRETVAL.
SELECT-OPTIONS: p_arbpl FOR crhd-ARBPL MODIF ID two.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_arbpl-low.
REFRESH sh_arbpl.
SELECT * from crhd into CORRESPONDING FIELDS OF TABLE sh_arbpl WHERE werks eq '1000'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_ARBPL'
DYNPROFIELD = 'P_ARBPL'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = sh_arbpl
return_tab = t_rtn.
LOOP AT t_rtn INTO x_rtn .
ENDLOOP.
x_dynpfields-fieldname = 'P_ARBPL-LOW' .
x_dynpfields-fieldvalue = x_rtn-fieldval.
APPEND x_dynpfields TO dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dynpfields
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* UNDEFIND_ERROR = 7
* OTHERS = 8
Regards,
Sivaganesh -
Hiding variable values in the input selection screen.
Hello Experts,
We have an authorisation relevant characteristic on which we have built a variable. We have restricted few values for this characteristic through the analysis authorisation.
The business requirement is that these values which are maintained in the analysis authorisation should not be populated in the input selection screen for that particular variable. In other words we have to hide these values but the variable should a part of input selection screen.
Can anyone please guide on how can we hide these variable values inspite of maintaining them in our analysis authorisations.
Thanks..
Best Regds,
Suyog...Hi Suyog,
Have you got any solution on this issue. I have same kind of issue in BI7. When running the RSRT transaction manager has to give some comments for a document option. but the subordinates should not modify or see the comments. Is there any way to restrict this access to certain users. Our requirement is to either disable the document option or should not appear in the list.
please give your inputs to find a way to solution.
Thanks in advance.
Regards,,
Appala Raju -
Selection screen field value capturing
Hi,
I have developed a report for displaying amendment changes in a purchse order. The input are purchase order
and plant. Now they have asked for an additional input of version field, which should also have F4 field-value help.
For version field, default there is no F4 key. So, i have written code like after entering the PO number when we press the enter key, for the corresponding PO, it brings the version no in input field. But my problem is it is displaying the values for version field, but when i select some value it is not getting updated in selection-screen version field. I have attached my code below... please help me
in the below code my problem is only between
AT SELECTION-SCREEN on value-request for P_REVNO.
and
start-of-selection event...
TABLES : ekko,
ekpo,
cdhdr,
cdpos,
MEPO1325,
t001,
t166c,
t166t,
adrc,
komp, " net rate of header
konv, " net value of purchase order
zammendpodet.
TYPES : BEGIN OF ts_cdpos,
ebeln TYPE ekbe-ebeln,
ebelp TYPE ekbe-ebelp,
matnr type ekpo-matnr,
maktx type makt-maktx,
prdat type ekpo-prdat,
belnr TYPE ekbe-belnr,
budat TYPE ekbe-budat,
tkey(70),
txz01 TYPE ekpo-txz01,
ctxnr TYPE t166c-ctxnr,
desp(20) type C,
MEINS LIKE MARA-MEINS,
chtxt TYPE t166t-chtxt.
INCLUDE STRUCTURE cdpos.
TYPES : END OF ts_cdpos.
data : begin of it_makt occurs 0,
matnr like makt-matnr,
maktx like makt-maktx,
end of it_makt.
data : begin of it_maRA occurs 0,
matnr like maRA-matnr,
mEINS like maRA-mEINS,
end of it_maRA.
*Internal table declartion
DATA : it_erev TYPE TABLE OF erev WITH HEADER LINE,
it_ekko1 type table of ekko with header line,
it_konv2 type table of konv with header line,
it_ekpo TYPE TABLE OF ekpo WITH HEADER LINE,
it_ekpo1 TYPE TABLE OF ekpo WITH HEADER LINE,
it_cdhdr TYPE TABLE OF cdhdr WITH HEADER LINE,
it_t166c TYPE TABLE OF t166c WITH HEADER LINE,
it_ekbe TYPE TABLE OF ekbe WITH HEADER LINE,
IT_AMMEND TYPE TABLE OF ZAMMENDPODET WITH HEADER LINE,
IT_AMMEND1 TYPE TABLE OF ZAMMENDPODET WITH HEADER LINE,
it_komp TYPE TABLE OF KOMP WITH HEADER LINE,
it_konv type table of konv with header line,
it_konv1 type table of konv with header line,
it_cdpos TYPE TABLE OF ts_cdpos WITH HEADER LINE.
data : BEGIN OF it_erev1 occurs 0,
revno TYPE erev-revno.
data : end of it_erev1.
data : begin of it_cdpos1 occurs 0.
include structure cdpos.
data : ebeln like ekko-ebeln,
item like ekpo-ebelp,
aedat like ekpo-aedat,
matnr like ekpo-matnr,
txz01 like ekpo-txz01,
desp(20) type C,
MEINS LIKE MARA-MEINS,
item1 like ekpo-netpr.
data : end of it_cdpos1.
types : dy_temp TYPE lips-lgort.
DATA : dyfields LIKE dynpread OCCURS 1 WITH HEADER LINE, dy_value TYPE dy_temp.
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values.
*Work variable declaration
DATA : v_revno TYPE erev-revno,
revno1 type zammendpodet-revno,
w_version TYPE erev-revno,
w_erdat TYPE erev-erdat,
w_eruhr TYPE erev-eruhr,
wv_eruhr TYPE erev-eruhr,
v_tabkey TYPE cdpos-tabkey,
v_temp(5),
v_olddate(8),
v_newdate(8),
v_value_old TYPE cdpos-value_old,
V_OLD TYPE EKPO-BRTWR, " OLD VALUE FOR PURCHASE ORDER
l_ind TYPE i,
temp value 0 type i,
temp1 type i,
temp2 type i,
temp3 type i,
wa_cdpos like line of it_cdpos,
wa_cdpos1 like line of it_cdpos1,
v_tabkey1 TYPE cdpos-tabkey.
PARAMETERS : p_ebeln TYPE ekko-ebeln,
p_ebelp TYPE ekpo-ebelp.
p_bukrs TYPE t001-bukrs,
p_revno type erev-revno.
INITIALIZATION.
AT SELECTION-SCREEN on value-request for P_REVNO.
CLEAR: dyfields[], dyfields.
dyfields-fieldname = 'P_REVNO'.
APPEND dyfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dyfields.
READ TABLE dyfields INDEX 1.
SELECT revno
FROM erev
INTO TABLE it_erev1 WHERE edokn = p_ebeln.
IF sy-subrc = 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'REVNO'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'P_REVNO'
value_org = 'S'
TABLES
value_tab = it_eREV1
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.
START-OF-SELECTION.
SELECT SINGLE *
FROM t001
WHERE bukrs EQ p_bukrs.
IF sy-subrc EQ 0.
SELECT SINGLE *
FROM adrc
WHERE addrnumber EQ t001-adrnr.
ENDIF.
SELECT SINGLE *
FROM ekko
WHERE ebeln
EQ p_ebeln
AND frgke = 2.
select * from konv into corresponding fields of table it_konv where knumv eq ekko-knumv.
useful informations will be rewarded.
thanks and regards,
subbu.,Hi ,
Use this function module
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-repid
dynumb = sy-dynnr
tables
dynpfields = t_dynpfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
where t_dynpfields would contain name of field and value you want to update.
Please reward if useful. -
Problem using At Selection Screen on value request for *"Select Fieldname"*
Hi All,
I Have a requirement of passing mutiple paraters value or selection option values in selection screen.
For Eg :I Have -
*--- Selection Screen
Select-options : s1 for vbak-vbeln ,
s2 for vbap-posnr.
*--- At Selection Screen
At Selection Screen on value request for s1-low.
i need to pass S1-low as well as S2-low ...
i.e first item of the Sales Document.
Value is getting passed in S1-low but not in S2-low
Can anybody help me on this ...
Thanks in Advance ..Hi,
Make use of the FM "F4IF_INT_TABLE_VALUE_REQUEST" for the value request for the first field.
Use the "FIELD_MAPPING" in the tables parameter of the above FM.
Please go through the FM documentation.
Hope this will help you.
Regards,
Smart Varghese -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_locat.
Experts,
In BW, does anybody have some simple code for when on your selection-screen you have an input parameter for the location of the file you want to upload. In SAP/R3 there use to be "Perform get_local_path" to drill down thru your hard drive to find the file you want to select to upload. I am not sure what to use in BW to execute a drill down process for getting the file in a drop down window.
Thank-You!Are you trying to browse the local PC or the appliation server.
Implement the program above, give it a try. When you hit F4, you will get a file open dialog, selection your file, then click open, this will fill the pathfile into your parameter on the selection screen. IS this whay you are looking for?
You don't need to provide anything, but you can if you want. There are import parameters.
report zrich_0001.
data: ifile type filetable.
data: xfile like line of ifile.
data: return type i.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
call method cl_gui_frontend_services=>file_open_dialog
EXPORTING
<b> WINDOW_TITLE = 'Please choose a file'
* DEFAULT_EXTENSION =
DEFAULT_FILENAME = 'Test.xml'
* FILE_FILTER =
INITIAL_DIRECTORY = 'C:'
* MULTISELECTION =</b>
changing
file_table = ifile
rc = return.
read table ifile into xfile index 1.
p_file = xfile-filename.
Regards,
Rich Heilman -
AT SELECTION-SCREEN ON VALUE-REQUEST - what has the user entered so far?
Hi,
the online help says to
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xyz.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program
p_xyz is indeed empty at this event, but is there really no way to find out what the user had entered so far?Did you try a call to FM DYNP_VALUES_READ (Check at [Input Help in Dialog Modules|http://help.sap.com/SAPhelp_nw70/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/frameset.htm])
Regards,
Raymond -
At selection-screen on value-request
Hi experts,
Pls see the below code.
When ever plant is enterd in screen i have to get material no. and material group based on that plant dynamically.
I am getting F4 list of values for the first one.But For the second one i am not getting.
What may be teh problem?
*& Report ZRA_SELECTIONSCTREEN *
REPORT ZRA_SELECTIONSCTREEN .
tables: mara,marc.
parameters: p_werks like marc-werks,
p_matnr like marC-matnr,
p_matkl like mara-matkl.
data: begin of it_matnr occurs 0,
matnr like mara-matnr,
end of it_matnr.
data: begin of it_matkl occurs 0,
matkl like mara-matkl,
end of it_matkl.
at selection-screen on value-request for p_matnr.
select matnr into table it_matnr from marc where werks = p_werks.
if not it_matnr[] is initial.
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 = it_matnr
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.
ENDIF.
select matkl from mara into table it_matkl for all entries IN it_matnr
WHERE MATNR = IT_MATNR-MATNR.
if not it_matkl[] is INITIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MATKL'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'p_matkl'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MATKL
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.
ENDIF.
Regards
Ravi.hi
good
i tried your report, f4 help is coming for all the fields but dynamic field selection is ot coming because ther eis a prob with your select statment,
you select the data from the database table for the another two fields as the value you r entering for werks(plant).
thanks
mrutyun^ -
AT SELECTION-SCREEN ON VALUE-REQUEST needed
hi,
i want code for atselection-screen for one parameter.
pls check the code i am sending.i am not understanding that if any one knows pls explain me.and it is correct or not.
parameters: P_LDCTY(2).
DATA: BEGIN OF IHELP_FIELDS OCCURS 20.
INCLUDE STRUCTURE HELP_VALUE.
DATA: END OF IHELP_FIELDS.
DATA: BEGIN OF HELPTAB OCCURS 100,
FELD(50),
END OF HELPTAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LDCTY matchcode object ZSDOTC_VOYAGE.
REFRESH IHELP_FIELDS.
MOVE 'VBAK' TO IHELP_FIELDS-TABNAME.
MOVE 'ZZLOADCTY1' TO IHELP_FIELDS-FIELDNAME.
MOVE 'X' TO IHELP_FIELDS-SELECTFLAG.
APPEND IHELP_FIELDS.
REFRESH HELPTAB.
SELECT *
FROM ZPORT
ORDER BY ZZCNTRY INTO IHELP_FIELDS.
MOVE ZPORT-ZZCNTRY TO HELPTAB.
APPEND HELPTAB.
ENDSELECT.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
DISPLAY = ' '
FIELDNAME = 'ZZCNTRY'
TABNAME = 'ZPORT'
IMPORTING
SELECT_VALUE = SELECTED_VALUE
TABLES
FIELDS = IHELP_FIELDS
VALUETAB = HELPTAB
EXCEPTIONS
FIELD_NOT_IN_DDIC = 01
MORE_THEN_ONE_SELECTFIELD = 02
NO_SELECTFIELD = 03.
IF SELECTED_VALUE <> SPACE.
P_LDCTY = SELECTED_VALUE.
ENDIF.
pls help mein this issue.
points will be awarded for right answer,
thanks and regards
suneethaHi suneetha,
1. we have to juse like this.
2. a) use FM F4IF_INT_TABLE_VALUE_REQUEST
b) syntax is : AT SELECTION-SCREEN ON VALUE-REQUEST FOR MYFIELD.
3. just copy paste in new program.
4.
Hi prakash,
1. sample code (just copy paste)
2.
REPORT ABC.
DATA : BEGIN OF ITAB OCCURS 0,
UNAME LIKE USR01-BNAME,
END OF ITAB.
data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
data : RETURN_wa LIKE DDSHRETVAL .
PARAMETERS : A(12) TYPE C.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.
ITAB-UNAME = 'U01'. APPEND ITAB.
ITAB-UNAME = 'U02'. APPEND ITAB.
ITAB-UNAME = 'U03'. APPEND ITAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ITAB-UNAME'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'A'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = ITAB
FIELD_TAB = FTAB
RETURN_TAB = return_tab
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
break-point.
regards,
amit m. -
Problem in at selection-screen on value request
hi friends ,
i want to display f4 help for a field in a popup. this i can do, but this popup comes based on values
i entered in other screen fields . but these values are not updated to screen values when i trigger f4.Hi,
DATA: T_DYNPRO TYPE TABLE OF DYNPREAD,
WA_DYNPRO LIKE LINE OF T_DYNPRO,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PARAM.
WA_DYNPRO-FIELDNAME = 'Screen Field Name'.
APPEND WA_DYNPRO TO T_DYNPRO.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = T_DYNPRO
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
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE T_DYNPRO INTO WA_DYNPRO WITH KEY FIELDNAME = 'Screen Field Name'.
TEMP = WA_DYNPRO-FIELDVALUE.
" Select the values based on Temp and populate your internal table for F4 help using the Screen value Temp
"Call 'F4IF_INT_TABLE_VALUE_REQUEST' and display the pop up. -
Hi All,
I am facing a problem with selection screen parameter.
I have one file parameter p_fname TYPE rlgrap-filename OBLIGATORY.When I enter some file path and excute I will get the result and once again when I start to execute the program I expect the previous value(file path) should be available for this file parameter that has entered on the selection screen but I am not getting that.
I dont find any parameter id for this field data element.
Please let me know how to do this?
Best Regards
RameshHi,
You should have..
DATA: FLNAME TYPE STRING.
PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = FILENAME.
Find the demo code below, it uses the file :
report ZDS_BDC_MM01_2
no standard page heading line-size 255.
*include bdcrecx1.
*parameters: dataset(132) lower case.
*** DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
* If it is nessesary to change the data section use the rules:
* 1.) Each definition of a field exists of two lines
* 2.) The first line shows exactly the comment
* '* data element: ' followed with the data element
* which describes the field.
* If you don't have a data element use the
* comment without a data element name
* 3.) The second line shows the fieldname of the
* structure, the fieldname must consist of
* a fieldname and optional the character '_' and
* three numbers and the field length in brackets
* 4.) Each field must be type C.
*** Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record OCCURS 0,
* data element: MATNR
MATNR_001(018),
* data element: MBRSH
MBRSH_002(001),
* data element: MTART
MTART_003(004),
* data element: XFELD
KZSEL_01_004(001),
* data element: MAKTX
MAKTX_005(040),
* data element: MEINS
MEINS_006(003),
* data element: MTPOS_MARA
MTPOS_MARA_007(004),
end of record.
DATA: FLNAME TYPE STRING.
*** End generated data section ***
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*** MESSAGE******
DATA: BEGIN OF MESSTAB OCCURS 0.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: MATNR TYPE MARA-MATNR,
END OF MESSTAB.
****END OF MESSAGE****
PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = FILENAME.
start-of-selection.
*perform open_dataset using dataset.
perform open_group.
FLNAME = FILENAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FLNAME
FILETYPE = 'DAT'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = record
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT record.
DATA:
CNT TYPE I.
CNT = CNT + 1.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
record-MATNR_001.
perform bdc_field using 'RMMG1-MBRSH'
record-MBRSH_002.
perform bdc_field using 'RMMG1-MTART'
record-MTART_003.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
record-KZSEL_01_004.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX_005.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
record-MEINS_006.
perform bdc_field using 'MARA-MTPOS_MARA'
record-MTPOS_MARA_007.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
*perform bdc_transaction using 'MM01'.
CALL TRANSACTION 'MM01' USING BDCDATA
MODE 'N'
UPDATE 'A'
MESSAGES INTO MESSTAB.
READ TABLE MESSTAB INTO MESSTAB INDEX CNT.
IF MESSTAB-MSGTYP = 'E'.
MESSTAB-MATNR = RECORD-MATNR_001.
MODIFY MESSTAB INDEX CNT FROM MESSTAB. " TRANSPORTING MATNR.
ENDIF.
ENDLOOP.
FORM OPEN_GROUP.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = 'MM01'
USER = SY-UNAME
KEEP = 'X'.
ENDFORM.
FORM BDC_INSERT.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'MM01'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
TABLES
DYNPROTAB = BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
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.
END-OF-SELECTION.
LOOP AT MESSTAB.
IF MESSTAB-MSGTYP = 'E'.
WRITE:/ 'ERROR OCCURED ON MATNR = ',MESSTAB-MATNR , 'MESSAGE : MATNR ALREADY EXISTS IN MARA!!!'.
ENDIF.
ENDLOOP.
perform close_group.
*perform close_dataset using dataset.
*& Form close_group
* text
* --> p1 text
* <-- p2 text
FORM close_group .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 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.
ENDFORM. " close_group
*& Form bdc_dynpro
* text
* -->P_0270 text
* -->P_0271 text
FORM bdc_dynpro USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. " bdc_dynpro
*& Form bdc_field
* text
* -->P_0275 text
* -->P_0276 text
FORM bdc_field USING FNAM FVAL.
IF FVAL <> ' '.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. " bdc_field
HTH
Regards,
Dhruv Shah -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR D
I have four Select options A,B,C,D
For A value is entered
For B value is entered
For C value is entered
For D , i need to create a custom search help.i will develop that in the event
AT SELECTION-SCREEN ON VALUE-REQUEST FOR D.while generating the search help here
i need to access the values that are entered in A,B,C.
Plz any help ?Hi,
You can use the Function module 'F4IF_INT_TABLE_VALUE_REQUEST' to display your custom values in search help. Refer the below sample code on how to use this function module.
REPORT ZTAB_SHELP.
parameters: p_ebeln type ekko-ebeln.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_return type STANDARD TABLE OF DDSHRETVAL,
wa_return like line of it_return.
*at selection-screen
at selection-screen on value-request for p_ebeln.
select *
up to 10 rows
from ekko
into CORRESPONDING FIELDS OF TABLE it_ekko.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'EKKO'
RETFIELD = 'EBELN'
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'EBELN'
STEPL = 0
WINDOW_TITLE = 'Ekko Records'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = 'X' "allows you select multiple entries from the popup
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET = ld_ret
TABLES
VALUE_TAB = it_ekko
FIELD_TAB = lt_field
RETURN_TAB = it_return
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
READ TABLE it_return into wa_return index 1.
p_ebeln = wa_return-fieldval.
Regards,
Murali
Edited by: murali krishnan Rajendran on Jan 27, 2011 8:03 AM -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR
Experts,
I have two selection parameters on Selection_Screen as subscreen, as below:
Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECT-OPTIONS :
s_matnr FOR mara-matnr MODIF ID sc1, "Material
s_grid FOR mara-J_3APGNR MODIF ID sc6, "Grid values "pkb001
SELECTION-SCREEN END OF BLOCK b2.
selection-screen end of screen 1010.
Now i want to populate s_grid (Grid value) based on the values enterd for s_matnr (material ).
but when i want use:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_grid,
I'm not getting the values eneterd in s_matnr..
is the problem beacuse of subcreen?
Answers are highly appriciated.
Thanks.Yes that is correct, Once I hit enter key, then only the value for s_matnr populates, but it is not a good Idea to expect the user to hit the enter key. is there any way i can imitate/simulate "enter" key in the program?
also I'm using the FM:'DYNP_VALUES_READ' but that is also not getting me any value..
below is the code I'm using,
FORM sub_get_grid .
Refresh: t_mara.
data: lin type i.
data: l_dyname type standard table of dynpread,
w_dynpread type dynpread.
clear w_dynpread.
w_dynpread-fieldname = 'S_MATNR'.
append w_dynpread to l_dyname.
clear w_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = l_dyname.
*Do not allow to select more than 1 material at a time.
SELECT
MARA~MATNR
INTO TABLE t_mara
FROM MARA
WHERE MARA~MATNR IN s_matnr.
describe table t_mara LINES lin.
If lin > 1.
Refresh: s_matnr.
MESSAGE i000 WITH text-033.
LEAVE LIST-PROCESSING.
* LEAVE TO SCREEN 100.
endif.
ENDFORM. -
Hi,
I created a selection screen with 2 fields.
SELECTION-SCREEN begin of block selscr1 with frame title text-s01.
example-
PARAMETERS: p_ptr type BU_PARTNER,
p_typ type BU_TYPE.
SELECTION-SCREEN begin of block selscr2 with frame title text-s02
My question is -
when user selects BP value (like example 1000000005 - then i want to display corresponding values in bp type field(p_typ) ( i dont want to display all the values, i want to scrutinize the values and then display.)
can any one tell me how i can do this?
Thanks.
Sandhya.hi,
use at selection-screen output.
change the second field acording to u'r requirment.
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. .
regards,
chandu
Edited by: CHANDRASEKHAR KONDAPANENI on Mar 26, 2008 11:47 PM -
0FI_GL_4 data source input selection screen
Dear experts,
I have enabled the input selection option tickfor fields PRCTR and KOSTL in data source 0FI_GL_4 with RSA6.
Both the fields are available in extract checker RSA3 too. But while does not have any effect while running the extractor. PRCTR and KOSTL are not having any effect while using in selection screen. Kindly let me know if any process there to enhance the standard program by putting the extra field in the selection (open cursor).
JigarHi Leandro,
First, if you want to change a selection field, you need to do it in RSA6, checking the selection flag. I wouldn't touch the table..
Not always the filter is just checking the flag, I don't know particulary 0FI_GL_4, but the filter might be done in the Function Module logic.
Where have you updated that field? 0GL_ACCOUNT is an infoobject, so it's in BW. If you want to filter in the InfoPackage, you need to filter in ERP, so it's a field (HKONT) and not an Infoobject.
For 0FI_GL_4, if you check transaction RSA2, you'll see that selection is impossible, so I'm not sure if changing the table value manually would be enough.
Hope this helps.
Regards,
Diego
Maybe you are looking for
-
Gallery title text cut off and cover image not updating
Hello, I've been struggling with this for a couple of weeks now, and it's driving me mad. I've been making a book in iBook Author on my iMac (10.10.2). When I preview it in iBooks on the mac it all looks fine, but when I send it to my iPad2 (iOS 8.2)
-
Hello, As ever, I still struggle with organizing in Aperture and have read a variety of threads on the topic. I know I'm supposed to think of projects as permanent storage and albums as a means of organizing images. Is there a way to set up projects
-
How Much Control Do You Hove Over Migration Assistant?
I am finally getting around to installing Leopard and plan to do an Erase and Install to a partition on my firewire external drive and tinker with things over there before copying that image via SuperDuper to my iBook. In the meantime I can continue
-
How do I get my itunes library to transfer to my new computer?
I have a new laptop and a new ipod. How can I get my itunes library off my old laptop?
-
i'm trying to build a slideshow in final cut pro. about half of the 25 images i dragged over imported and the other half didnt. i'm not sure why as they are all jpeg images. i did take a few screenshots. the error simply says, "File Error: Unknown Fi