Fetching check number based on condition in selection screen
In selection screen there r four fields document no,document date ,company code,fiscal year .
According to client requirement, I have added check number in selection screen. If I enter the document no in selection screen , the value (bseg zuonr) should be retrived in the field check number. If I press F4 in the check number field , the value zuonr based on condition bschl = 50 should be displayed..
Now it is working fine in development system.
But in production it displays 3 values (bschl = 50, bschl = 40 and bschl = 25.Now I need that it should display a single value based on posting key bseg -bschl = 50 only.
my code:
At selection-screen on value-request for P_ZUONR-low.
select ZUONR INTO CORRESPONDING FIELDS OF TABLE VALUE_IT1 from BSEG where BELNR IN S_BELNR and BSCHL = '50'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZUONR'
dynprofield = 'P_ZUONR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = VALUE_IT1
FIELD_TAB = IG_BSEG
RETURN_TAB = 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.
Thanks in advance.
Hi,
You can achieve this using Boolean type transient variable.
> Create a Boolean type Transient variable in VO
> Use this transient variable as SPELL like ${oa.<view instance>.<view attribute>}
and in process for request method of controller class. set the value of this transient variable as true or false based on the condition
Similar Messages
-
How to fetch check number details
Hi ,
My requirement is to fetch the check number from payr table using CHECT field .
but relation ship i taken from bseg table.
i am giving query as follows
select single chect from payr into a_chect where vblnr = bseg-belnr.
above query is not giving solution.
is there any other relation ship for getting check number.Hi ,
My requirement is to fetch the check number from payr table using CHECT field .
but relation ship i taken from bseg table.
i am giving query as follows
select single chect from payr into a_chect where vblnr = bseg-belnr.
above query is not giving solution.
is there any other relation ship for getting check number.
i written subroutine program for calling into form .
form check_get tables in_tab structure itcsy
out_tab structure itcsy.
tables: payr.
data: a_chect type payr-chect,
b_belnr type bseg-belnr.
read table in_tab INDEX 1. "with key NAME = 'BSIK-BELNR'.
check sy-subrc = 0.
b_belnr = in_tab-value.
break-point.
select single CHECT from PAYR into A_CHECT where vblnr = b_belnr.
if sy-subrc = 0.
read table out_tab index 1. "with key 'CHECT'.
check sy-subrc = 0.
out_tab-value = a_chect.
modify out_tab index 1.
endif.
endform. -
Condition on selection screen parameters
Hi friends,
I have an ABAP query. Here , I have a date field (ISEG_ZLDAT - Cycle count date ) in the selection screen which is a parameter (not a select option). I have to write a condition for the report to pull all the materials which have a cycle count date less than the value entered on the selection screen.
How do I give this condition in the code ? Is there a way to do it without using select options ?
Please help.
Thanks,
DikshithaHi Dikshitha,
as also said by others try it this way:
Parameters:
p_ZLDAT type ISEG-ZLDAT.
Data:
t_ISEG like standard table of ISEG.
select * from ISEG into table t_ISEG where ZLDAT lt p_ZLDAT.
if sy-subrc ne 0.
endif.
With luck,
Pritam. -
Check the file extension in the selection screen
hi,
in the selection screen i am giving a file path. the file should be of type PDF only.
how to validate it ?
i am splitting the file path at "." and checking for the last three letters , if it pdf or not.
but it is throwing error for pdf format also.
throw some light on it and let me know.
thanks and regards.
sukihi,
You need to pass only COMPLETE_FILENAME
say C:\ABC\A\ABC.TXT
data : v_filename type PCFILE-PATH.
v_filename = "C:\ABC\A\ABC.TXT".
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
COMPLETE_FILENAME = v_FILENAME
IMPORTING
DRIVE = v_DRIVE
EXTENSION = v_EXTENSION
NAME = v_name
NAME_WITH_EXT = v_namewithtxt
PATH = PATH_VALUE
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5.
you will get the output as
DRIVE C
EXTENSION TXT
NAME ABC
NAME_WITH_EXT ABC.TXT
PATH \ABC\A\
Hope this helps.
Regards,
Richa -
Logic based on Date on Selection-Screen
Dear friends,
I've been writing a report in which I have the date field on selection-screen. By default I have been displaying the system date on the selection-screen.
The reqiurement is that the user cannot execute the code for a date in past (less than the system date) or cannot give a date less than the sytem date
but can execute the same for a date in future (greater than the system date).
Can any one give me the logic for the same.
Regards,
Alok.Hi
This is the code for u.
PARAMETERS : P_DATE TYPE SY-DATUM .
INITIALIZATION.
MOVE SY-DATUM TO P_dATE.
AT SELECTION-SCREEN ON P_DATE.
IF P_DATE < SY-DATUM.
MESSAGE 'Entered date cannot be in Past' Type 'E'.
**Raise any message that u created otherwise
ENDIF.
<b>Reward if Helpful</b> -
How to disable and enable Check box based upon condition
Hi,
I wants to disable/hide the check box field before the required field is filled. Kindly help meHi Mohammed,
Try to use customize InfoPath form, add rules. Go to list tab, click customize Form, then this opens the list form in InfoPath
format.
1.Select the check box field control, click add rules, select if is blank, show validation error action.
2.Then go to conditions, click column name is blank, change it to the required column you want.
3.Go to rule type, click validation, change it to formatting, select hide this control.
4.Publish the InfoPath form.
Best Regards.
Kelly Chen
TechNet Community Support -
How to fetch data based on this selection screen
Hi Friends:
I've a selection screen which contains these 3 fields:
company code (t001-bukrs)
material division (mara-spart)
posting date (bkpf-budat)
based on the above fields, I've to fetch the following:
ekpo-bukrs
mara-spart
mseg-werks
mseg-lgort
bseg-hkont
bseg-kostl
bseg-hkont
skat-txt50
mseg-mblnr
mseg-zeile
bseg-belnr
bkpf-bktxt
mseg-insmk
bkpf-monat
bkpf-budat
mseg-bwart
mbew-matnr
makt-maktx
mseg-menge
mseg-meins
mbew-stprs
mseg-dmbtr
bseg-pswsl
ausp-atwrt
mara-matkl
mara-mtart
mbew-bklas
mbew-bwtar
mkpf-vgart
mcha-charg
mseg-ebeln
aufk-aufnr
mseg-ummat
vbak-vbeln
likp-vbeln
bkpf-usnam
Please help me with the logic . I want to ask that in which order I should start fetching data.How to relate it from selection screen. Which table I should fetch first based on the selection screen.how to relate mseg/bseg/mara/mbew/vbak/bkpf etc.
Please help.
Thanks for your time.Hi,
I dont think you need EKPO to fetch your bukrs. It is available in BKPF too.
Use inner join to join MKPF, BKPF, MAKT, fetch all the related entreis.
Use Inner join on MBEW, MCHA for all entries from above query.
use inner join on AUSP for all entries from above query.
Use may use separate queries or inner joins for LIKP and VBAK with for all entries.
Use separate for all entries for BSEG and MSEG. Do not use any JOIN on BSEG as it is a pooled table.
As per the need you may change the queries..
Regards,
Subramanian -
Adding check box in selection screen
Hi all,
I have to add a check box to the previous report, I need to fetch the data based on the checkbox. Please tell me how to proceed further with flag set.
Thanx and Regards,
Line.Hi..
1) do u want this? if checkbox is not checked then no data is read from database and if checked then only data wil be fetched -
tables pa0001.
parameters p_check as checkbox.
data: begin of itab occurs 0.
include structure pa0001.
data end of itab.
start-of-selection.
if p_check = 'X'.
perform read_data.
endif.
if itab[] is not initial.
loop at itab.
write:/ itab-pernr.
endloop.
else.
write: 'No data fetched from database,may be u need to check the Checkbox'.
endif.
*& Form read_data
text
--> p1 text
<-- p2 text
FORM read_data .
select * from pa0001 into table itab up to 20 rows.
ENDFORM. " read_data
2) Adding fields based on Chekbox -
parameters: p_check AS CHECKBOX MODIF ID ABC USER-COMMAND CH.
parameters: p_pernr like pa0001-pernr modif ID ABD,
P_DATE LIKE PA0001-BEGDA MODIF ID ABD.
Check sy-ucomm = 'CH'.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if p_CHECK = 'X'.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ELSE.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP. -
Running Query Based on Condition
Hi
I want to run different query based on a condition. I am not able to execute the following query. is this the right way to run different query based on condition?
SELECT * FROM (
CASE WHEN (SELECT COUNT (*) from data1 where ID = 1 AND stype = 'A') > 0 THEN select * from data where ID = 1 AND stype = 'A'
WHEN (SELECT COUNT (*) from data1 where ID = 1 AND stype = 'B') > 0 THEN select * from data where ID = 1 AND stype = 'B'
WHEN (SELECT COUNT (*) from data1 where ID = 1 AND stype = 'C') > 0 THEN select * from data where ID = 1 AND stype = 'C'
END
) as a;
Edited by: user6016744 on 21 Apr, 2011 12:40 AMThis works for us; hope it helps.
CREATE OR REPLACE FUNCTION SCHEMA.GET_STEP_COST (loan_number_in in VARCHAR2, step_code_in in VARCHAR2 default null, ws_in in VARCHAR2 default null )
RETURN VARCHAR2 IS retval VARCHAR2 (50);
/*passing in loan number and step code you need the cost for, will return the cost*/
BEGIN
CASE ws_in --depending on workstation in is the table select
WHEN 'F' THEN
EXECUTE IMMEDIATE 'SELECT '|| step_code_in ||' FROM CLAIMS_FCL_STEPS WHERE LOAN_NUMBER = '|| loan_number_in ||'' INTO retval;
WHEN 'R' THEN
EXECUTE IMMEDIATE 'SELECT '|| step_code_in ||' FROM CLAIMS_RS_STEPS WHERE LOAN_NUMBER = '|| loan_number_in ||'' INTO retval;
WHEN 'L' THEN
EXECUTE IMMEDIATE 'SELECT '|| step_code_in ||' FROM CLAIMS_LM_STEPS WHERE LOAN_NUMBER = '|| loan_number_in ||'' INTO retval;
ELSE
retval := 0;
END CASE;
RETURN retval;
END GET_STEP_COST;
/ -
Hi Guys,
I am facing some problem while doing check printing .
We are printing Checks thru Check Printing from Checks for Payment window and we are using check stock and we are entering the check number manuallly while adding payments.
so when we print the check the Next Check number Field in House Bank accounts is changing and while taking a print the next check number is printed instead of the manually enetered check number.
For ur info.
I have set the paper type as OverFlow Prenumber Check Stock in (Set up-Banking-House Bank Accounts)
In Print Preferences window i have set (Print on Check Stock - Over Flow Check Stock )
Is there any fault in defining all the above and if yes pls tell me how to over come this.
Regards,
VamsiHi Vamsi,
Unless you are actually printing a manual check, you don't want to enter the check number as it will be assigned when you go to print; that it why the next check number appears when you go to print. If your check stubs do run onto another page, do as Gordon mentions - change the setting so next page is blank page instead of check stock.
To print your checks:
1. In Outgoing Payment/Checks for Payment, process payment and leave check number blank and don't select 'manual'.
2. When you go to print, check under House Bank Account setup that the check number is correct.
3. Print the check from either Check for Payment or Document Printing.
4. The window should confirm the first check number that will be used. If incorrect, cancel/don't proceed and fix in House Bank Account setup.
5. Once the check(s) print, verify the checks/numbers with the Check Number Confirmation window and select the applicable print status (i.e. 'confirmed', etc.). If the check stock numbers were not in order, you can update the check number in this window so the right number is linked to the applicable outgoing payment transaction.
If you go back to the Checks for Payment window, you will see the check number has been assigned to the payment (lower left field). If there is no check number and 'manual' is not selected, this means it has not been printed/confirmed.
Heather -
Passing parametrs to fetch the 'number 'of corresponding entries???
I have passed a parameter p_count at selection screen
parameters : p_count type i,
select
matnr
from mara
into table t_mara
up to p_count
while executing when i give a number at selection screen it is fetching the records depending the entries in the database table.... but if the database entries are 10000 records and the user enters 10,001 it should show an error message and also if any new data is added in the data base record it should fetch that record as well
how can i solve the above query plz helpYou can use the COUNT( * ) to know about total number of entries.
AT SELECTION-SCREEN ON P_COUNT.
SELECT COUNT( * ) INTO L_COUNT FROM MARA.
IF L_COUNT > P_COUNT.
* ERROR MESSAGE
ENDIF.
Regards,
Naimesh Patel -
How to display the Check number during manual check clearing - FEBAN
Hi all experts,
Hope you can help me on this one. We recently changed our house bank. Because of this change, when we try to post our bank statement, the checks issued from the old bank do not clear. However, when we try to manually clear them through FEBAN transaction, there is no reference to the check number. This becomes a problem, especially when we have about 150 open items for $100 each - we do not know which one to clear against. It is not practical to have to drill down into each document number to find the check number. Is there a way to bring in the check number in the FEBAN open items screen? Has any one else experienced this issue? Any comments / suggestions will be very helpful.
Thanks,
MJHi Chandra,
I tried to add the field through O7R3 (your suggestion) as well as through O7F4. I still cannot see the check field displayed. I tried the FBL1N transaction as well - no check number field there either.
Can you help me? Is there anything else in the config that could cause this?
Thanks,
MJ -
How to position a check box in an ABAP query's selection screen?
Hi Experts,
I am working on SAP queries and for that I have created an infoset. There was a requirement to have a checkbox at selection screen, which we can obtain by Infoset-> Extras->"Selections" tab -> create a parameter as a checkbox.
However, it is appearing at the first place among all the selection screen elements which are defined in the infoset.
Is there any way to have it positioned as per the requirement? (We have checked the option of "sequence on selection screen" provided while creating the checkbox, however, it does not work for us).
Kindly have a look at the attached screen shots.
Here , in the file, “Test Par” is the selection text for the parameter declared.
Thanks
MohitI think I have it 90%there. I have no error now, it edits a
record fine, if you add the checkbox to the record it adds it, and
if you take it away, it does that. BUT now it will not add a new
record.
This is my code now for the update / insert
<cfif not IsDefined("FORM.admin")>
<cfset IsAdmin= 0>
<cfelse>
<cfset IsAdmin= 1>
</cfif>
<cfif isDefined("Form.RecordID")>
<cfquery datasource="#APPLICATION.dataSource#">
UPDATE user
SET user.Fname=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Fname#">,
user.Lname=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Lname#">,
user.userName=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.userName#">,
user.password=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.password#">,
user.email=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.email#">,
user.admin =<cfqueryparam value="#IsAdmin#"
CFSQLType="CF_SQL_INTEGER">
WHERE ID =<cfqueryparam value="#form.RecordID#"
cfsqlType="CF_SQL_INTEGER">
</cfquery>
<cflocation url="indexUser.cfm?RecordID=#Form.RecordID#"
addtoken="no">
<cfelse>
<cfquery result="GetNewRecord"
datasource="#APPLICATION.dataSource#" dbtype="ODBC">
INSERT INTO user
(Fname, Lname, userName, password, email, admin)
VALUES (<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Fname#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Lname#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.userName#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.password#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.email#">,
<cfqueryparam value="#IsAdmin#"
CFSQLType="CF_SQL_INTEGER">)
</cfquery>
<cflocation url="indexUser.cfm">
</cfif>
Is there a better way to write this so it will work? I have
everything else working including the checkbox showing checked if
it is checked in the db, I believe this is my last hang up on a
checkbox.
Any ideas? -
Check for entries on the selection screen
if one of the select options is obligatory with no default value then the radio buttons does not work. Can anybody please let me know why. it is the same if i dont make the field obligatory but write code in at selection-screen on block with a error message.
REPORT ZSELECT1 .
tables : ekko.
data: group_id(3) type c.
SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME TITLE TEXT-001.
PARAMETERS: p_out RADIOBUTTON GROUP RADI DEFAULT 'X' USER-COMMAND
CHECK,
p_file RADIOBUTTON GROUP RADI.
SELECTION-SCREEN END OF BLOCK MAIN.
SELECTION-SCREEN BEGIN OF BLOCK output WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: so_ekgrp FOR EKKO-EKGRP obligatory MODIF ID OUT,
so_ekorg FOR EKKO-EKORG MODIF ID OUT.
SELECTION-SCREEN END OF BLOCK OUTPUT.
SELECTION-SCREEN BEGIN OF BLOCK UPLOAD WITH FRAME TITLE TEXT-003.
PARAMETERS: p_pcfile LIKE rlgrap-filename MODIF ID UPL,
p_dismod(1) TYPE c DEFAULT 'N' MODIF ID UPL.
SELECTION-SCREEN END OF BLOCK UPLOAD.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN P_OUT. GROUP_ID = 'UPL'.
WHEN P_file. GROUP_ID = 'OUT'.
ENDCASE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = GROUP_ID.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.You cannot have it as mandatory. Instead, you can write the validations in START-OF-SELECTION. Here is the modified code.
REPORT ZSELECT1 .
tables : ekko.
data: group_id(3) type c.
SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME TITLE TEXT-001.
PARAMETERS: p_out RADIOBUTTON GROUP RADI DEFAULT 'X' USER-COMMAND CHECK,
p_file RADIOBUTTON GROUP RADI.
SELECTION-SCREEN END OF BLOCK MAIN.
SELECTION-SCREEN BEGIN OF BLOCK output WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: so_ekgrp FOR EKKO-EKGRP MODIF ID OUT,
so_ekorg FOR EKKO-EKORG MODIF ID OUT.
SELECTION-SCREEN END OF BLOCK OUTPUT.
SELECTION-SCREEN BEGIN OF BLOCK UPLOAD WITH FRAME TITLE TEXT-003.
PARAMETERS: p_pcfile LIKE rlgrap-filename MODIF ID UPL,
p_dismod(1) TYPE c DEFAULT 'N' MODIF ID UPL.
SELECTION-SCREEN END OF BLOCK UPLOAD.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN P_OUT. GROUP_ID = 'UPL'.
WHEN P_file. GROUP_ID = 'OUT'.
ENDCASE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = GROUP_ID.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
IF p_out = 'X' and so_ekgrp[] is initial.
MESSAGE e000 WITH text-e01.
ENDIF.
Regards,
Srinivas -
AUTHORITY-CHECK before Selection-screen?
Hi,
i want to check the authority before the selection-screen. I do it in this way:
AT SELECTION-SCREEN OUTPUT.
AUTHORITY-CHECK OBJECT 'Z_REPORT'
ID 'PROGRAM' FIELD SY-REPID
ID 'ACTVT' FIELD '16'. "Ausführen
IF SY-SUBRC <> 0.
MESSAGE E010 WITH 'Keine Berechtigung für Programm: '
SY-REPID.
ENDIF.
But the selection appears without any parameters.
Is there a way to check without the selection-screen?
thanks.
regards, DieterHi Dieter,
Please check the below code for at selection screen authorization check.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
Regards,
Md Ziauddin
Maybe you are looking for
-
Reg: Open Purchase order
Hi Guru, as per the Budget change, One of the tasks that has to be done as a part of the change in budget is the updation of info-record condition records in open purchase orders. In terms of open purchase orders there are two scenarios.. Fully Open
-
Problem with latest Tiger upgrades
Im writing this for my son who just installed the latest software updates for Tiger. He is on a 12 inch iBook. Immediately after installing the upgrades he had a box taking up about 1/4 of his screen. It is is essentially a clear box with a line arou
-
Calling PL/SQL Functions And Open Oracle Reports From ADF Application
Hi all, My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application. Thank You.. Jack.N
-
1. Is it possible to do a mass payment release? 2. Can documents to be released for payment, be sent to the inbox of more than one user simultaneously?
-
So after installing itunes 7.6 on my work Windows XP PC, my itunes library file got corrupted, and for some reason, Itunes couldn't find any of my songs. So deleted my old library file, and reinstalled the 13,000+ songs and videos I have on my extern