ABAP code for Date Range
Hi All,
I have requirement to write code for date range.
Characterstic = Run-Out Date, it was created reference to 0Date.
Requirement is data should load depends on Run-Out Date 7 days old and 14 days future.
Logic is -7 days old >= Run_out date <= 14 days future.
please let me know how I need to proceed with ABAP code for this requirement.
Thanks.
Please do not ask for ABAP code here. Its not a training forum
Edited by: Pravender on Aug 18, 2011 1:46 AM
>
Sree vignesh wrote:
> Hi,
> In the select option we have a field month range as
> SELECT-OPTION : FROM 01.2007 TO 01.2009 " Let say Ur Selection option is SO_MONTH
> but now i need to add the DMBTR field considering the month range in the SELECT OPTION i.e., only FROM 01.2007 TO 01.2009 i mean without 2006 data.
>
> LOOP AT LT_DATA WHERE month in SO_MONTH. " Here add a Where condition
> ls_output-matnr = lt_data-belnr.
> ls_output-werks = lt_data-bukrs.
> ls_output-lgort = lt_data-dmbtr.
>
> COLLECT ls_output INTO lt_output .
>
> ENDLOOP.
>
> please help with code .
>
> thanks in advance.
Regards,
Suneel G
Similar Messages
-
InfoPackage ABAP Routine for Date Range - Only Start Date Extracted
I am using an ABAP Routine in an InfoPackage to select data for a 2 year period. The routine converts SY-DATUM into the Current Fiscal Year and Period, and then calculates the Starting and Ending Fiscal Year / Period of a 24 month period. The Start and End values are passed to the InfoPackage as l_t_range-low and l_t_range-high.
The Source and Target are both Basic Infocubes.
The InfoPackage executes successfully, and the Selection values on the Header tab of the monitor reflect a 24 month period. Unfortunately, on closer review of the data in the cube, only data for the first month appears to have been loaded. Im guessing that the extract was only performed with the From value, even though a To value was also provided.
I created a simple Infopackage and manually input the selection parameter values just to be sure I wasnt overlooking something. The InfoPackage performed as expected, loading more data which spanned the selection time period.
I can provide the code if it helps, but the fact that the monitor reflects a Start and End value suggests that the problem is with the InfoPackage, not the ABAP routine.
Has anybody ever experienced this before ? Any ideas would be greatly appreciated ?
Thanks,
LyleWe can write ABAP routine in Infopackage with a range of values (From & To). Make sure you fill all the following information while building the final range information as below,
l_s_range-sign = 'I'.
l_s_range-option = 'BT'.
l_s_range-low = lowvalue.
l_s_range-high = highvalue.
MODIFY l_t_range FROM l_s_range INDEX l_idx.
As you can see the key is passing the "BT" information for capturing range.
Hope it helps..
thanks
Kumar -
Hi,
In the select option we have a field month range as
SELECT-OPTION : FROM 01.2007 TO 01.2009
where as in one of the internal table we have data without considering the month range as below
MONTH RANGE BUKRS BELNR DMBTR
01.2006 10 1001 50
05.2006 10 1001 20
02.2007 10 1001 30
06.2007 10 1001 40
01.2009 10 1001 90
but now i need to add the DMBTR field considering the month range in the SELECT OPTION i.e., only FROM 01.2007 TO 01.2009 i mean without 2006 data.
if i write the code as below its getting all the data sum up but i dont want 2006 data
LOOP AT LT_DATA.
ls_output-matnr = lt_data-belnr.
ls_output-werks = lt_data-bukrs.
ls_output-lgort = lt_data-dmbtr.
COLLECT ls_output INTO lt_output .
ENDLOOP.
please help with code .
thanks in advance.>
Sree vignesh wrote:
> Hi,
> In the select option we have a field month range as
> SELECT-OPTION : FROM 01.2007 TO 01.2009 " Let say Ur Selection option is SO_MONTH
> but now i need to add the DMBTR field considering the month range in the SELECT OPTION i.e., only FROM 01.2007 TO 01.2009 i mean without 2006 data.
>
> LOOP AT LT_DATA WHERE month in SO_MONTH. " Here add a Where condition
> ls_output-matnr = lt_data-belnr.
> ls_output-werks = lt_data-bukrs.
> ls_output-lgort = lt_data-dmbtr.
>
> COLLECT ls_output INTO lt_output .
>
> ENDLOOP.
>
> please help with code .
>
> thanks in advance.
Regards,
Suneel G -
GRR2- 4FM-RepPaint(put ABAP code for convert data in field)
Hi,
If somebody know how possible add ABAP code for convert data in some column-field of report (by RepWriter,UserExit,BADI)?
Thanks a lot.Elaborate your question. Not clear ??
-
Abap Routine for Date selection in Infopackage
Hi
I have to write an abap routine for date selections in the infopackage,
There are two date begda and enda.
Do i code for BEGDA and fill in the begin date using routine and use another routine to fill the ENDA.
JPJPHi JP,
If you have two info objects BEGDA and ENDA in the Info package for selection
then you will have to write seperate routine for each of them.
If you want to give single value for each date field then update only the field l_t_range- low otherwise if you want to give range then you can update the internal table fields l_t_range-low and l_t_range-high .
Regards,
Prakash -
Needs sample ABAP code for field routine
Dear Expert,
There is a field "Pay Scale Group" in my DSO which stores the data in the format
AA1/B1/CCC2/DD2/EEE1, A1/BB2/CC2/DDD3/EE2 etc. These data has to be transferred to
InfoCube where "pay Scale Group" in the InfoCube will store the data like EEE1,EE2 etc.
I need to write a field routine on the transformation between DSO and Cube.
Can any one please help me with the sample ABAP code for this scenario.
Some more examples for better understanding of the requirement:-
Data in DSO(Source) Data in Cube(Target)
=================== ===================
AA1/B1/CCC2/DD2/EEE1 EEE1
AAA1/BB2/CC1/DDD3/EE2 EE2
A2/BBB2/CC2/DDD3/EEE5 EEE5
AA2/BB1/C1/DDD3/EE3 EE3
A3/B1/CC2/DDD1/EE4 EE4
Many thanks in advance.
Regards,
Prakash
Please do not dump your code requirements in SDN
Edited by: Pravender on May 18, 2011 11:37 AMHi,
You can use the following code :
Suppose the technical name of the field coming from DSO is ZPAY_SGRP.
And also for example let me take one record, that is ZPAY_SGRP = AA1/B1/CCC2/DD2/EEE1 .
My assumption is that there will always be 4 '/'.
In the field routine write the below code
data: V1(5) type c,
V2(5) type c,
V3(5) type c,
V4(5) type c,
V5(5) type c.
data : VAR1 TYPE /BIC/OIZPAY_SGRP.
split VAR 1 at '/' into V1 V2 V3 V4 V5.
result = V5.
V5 will be having the characters after the last '/' .That is V5 = EEE1.
Hope the above reply was helpful.
Kind Regards,
Ashutosh Singh
Edited by: Ashutosh Singh on May 17, 2011 3:53 PM
Edited by: Ashutosh Singh on May 17, 2011 4:17 PM -
ABAP code for BI 7.0 transformations start routine
Hi all,
I am trying to update data from DSO1 (Source1: transaction data) to Infocube(TARGET)
In the transformations Start routine, I have to read DSO2(Source2: Master data) for some fields.
DSO1 has CUSTOMER as part of key
DSO2 has CUSTOMER (key) and other fields....FIELD1, FILED2, FIELD3
Infocube to be updated with FIELDS1,2 & 3 WHILE READING DSO2.
WHERE DSO1 CUSTOMER matches with DSO2 CUSTOMER.
Also, data NOT TO BE UPLOADED into Infocube if FIELD1 in DSO2= NULL
Please give me the abap code for the above logic.
Appreciate any help in this regard.
Thanks.This is a doc from this site:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
Ravi Thothadri -
ABAP code for wrting a file to application server
<Moderator Message: We are not here to do your job for you>
Hi All,
i have a requirement to get the data from some other ABAP program and this data has to be written in one of the files present in application server.
please provide me the exact ABAP code for this...
Edited by: Siegfried Szameitat on Dec 17, 2008 10:40 AMthis has to be done using a process chain
-
Hi Friends,
I have created BI objects like infocubes, infoobjects, DTP, Datasource to transfer data from a flat file to BI system using SAP GUI... All data from flat file are transfered to BI successfully... i dont have any knowledge in ABAP... So i need to see the ABAP code for the BI objects i created above in my project... how can i see the coding for that?
thanks in advance
sasiHi Sasi,
All the objects which you create in BI will be stored in some standad tables,it only fetch details accordingly from those tables.For MasterData you can find the option as Display Routines in Extras.If you want to get more infomation about the STD Table and the Program involed in BI objects,just enter in (/h) mode.
Regards,
Prem -
Abap code for sap exit variables?
Hi,
i) Where can I find the abap code for SAP exit variables
OP_KEYDT used for the net due date
OP_KEYD2 used for the posting date
OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
How do we acheive that.
Thanks.Please tell how u solved ur issue i have the same scenario to be do.
-
ABAP Code for SAP exit varaibles?
Hi,
i) Where can I find the abap code for SAP exit variables
OP_KEYDT used for the net due date
OP_KEYD2 used for the posting date
OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
How do we acheive that.
Thanks.Hi Kumar,
Try this below mentioned example where default date is current date.
Step1: Create a variable(ex: cur_date) on requrired characteristic with Processing type "Customer Eixt" and check the check box for ready for input(if this variable need in selection screen).
Step 2: Goto T Code : CMOD and provide appropriate Project and choose components and click on display.
Step3: Double click on exit "EXIT_SAPLRRS0_001" you can see include "ZXRSRU01", double click on include.
Step4: Sample code to populate.
WHEN 'CUR_DATE'.
Data : l_p_range_SSS TYPE rrrangesid.
IF I_STEP = 1.
l_p_range_SSS-Low = sy-datum.
l_p_range_SSS-Sign = 'I'.
l_p_range_SSS-Opt = 'EQ'.
APPEND l_p_range_SSS TO e_t_range.
Endif.
The following values are valid for I_STEP:
· I_STEP = 1
Call up takes place directly before variable entry
· I_STEP = 2
Call up takes place directly after variable entry. This step is only started up when the same variable could not be filled at I_STEP=1.
· I_STEP = 3
In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again.
· I_STEP = 0
The enhancement is not called from the variable screen. The call up can come from the authorization check or from the Monitor.
Also, refer this link..
http://help.sap.com/saphelp_bw320/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
Cheers,
Allen -
Can i have html code for date select options (SEARCH HELP)
Hi frinds,
I have a BSP Page with input as date.
Can i have html code for date select options (SEARCH HELP)
MoosaHi
Please find the sample code below.
FROM DATE
<htmlb:inputField id = "dd"
width = "45%"
type = "DATE"
showHelp = "X" <- Search help
alignment = "CENTER"
maxlength = "10"
disabled = "TRUE"
value = "<%= w_FROMDATE %>" />
TO DATE
<htmlb:inputField id = "dd"
width = "45%"
type = "DATE"
showHelp = "X"
alignment = "CENTER"
maxlength = "10"
disabled = "TRUE"
value = "<%= w_TODATE %>" />
Thanks
kalyan -
How To Create ABAP Code For HR Context Sensitive Structural Authorization
Hello,
We have created a HR Custom Program which IS NOT built off the PCH or PNP Logical Database. As a result, we need to manually create ABAP code for HR Context Sensitive Structural Authorization Check in our custom HR program. Via HR Context Sensitive Structural Authorizations, we are restricting access to personnel numbers and the underlying HRP* tables.
Any assistance would be greatly appreciated with the identification of the SAP standard function modules (Ex. RH_STRU_AUTHORITY_CHECK, HR_CHECK_AUTHORITY_INFTY, HR_CHECK_AUTHORITY_INFTY , etc) used in HR Context Sensitive Structural Authorization Check, how they are used to control HR Structural authorization (P_ORGINCON), and some sample code.
Thank you in advance for all your assistance,
Ken BowersHello Ken
You can use the interface methods IF_EX_HRPAD00AUTH_CHECK to get the same structural authorization as you can see in PA20/PA30. You need to use the methods set_org_assignment and check_authorization for this purpose. For more information you can refer to include FP50PE21 from line 237 onwards till 270.
Regards
Ranganath -
Need ABAP code for the below Services requirement
Hi,
We have a requirement to show all the services for a particular Purchase order number.For this I built a view on 2 tables ESLL and EKPO.Now based on the below logic I need to bring the services for the Purchase order..
1.Enter PO number,item no. and Doc category in EKPO and find the Pack no.
2.Now take the Pack no. of EKPO and give in ESLL and find the Sub pack no.
3.Now take this Subpack no. and Give this sub pack as Pack no. in ESLL
4.This will be the Service entry record for that PO number.
Can any one Please suggest me to how to write the ABAP code for the above logic.
Thanks & Regards,
DinakarHi Dinaker,
Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
Thanks,
SAPBWI -
Need to update out put tax classifcation code for a range of items in Orac
Hi,
I need to update out put tax code for a range of items in Oracle EBS. At the moment we update tax code for individual items manually ubder invoice tab. Is there a better way to do this.
RegardsWhere can I find the mtl_system_items_interface table?Under INV schema.
R12 -- INV.MTL_SYSTEM_ITEMS_INTERFACE
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=MTL_SYSTEM_ITEMS_INTERFACE&c_owner=INV&c_type=TABLE
11i -- INV.MTL_SYSTEM_ITEMS_INTERFACE
http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=MTL_SYSTEM_ITEMS_INTERFACE&c_owner=INV&c_type=TABLE
Thanks,
Hussein
Maybe you are looking for
-
HELP!!! Mail wont open
Hi can someone pleaseeeeee help me with this problem. It all started about a month and half ago and i am unable to open mail. I have my mail in my dock and everytime i click on it i see "mail" at the top of the browser but the actual mail server or b
-
HTTP receiver Adapter-- 403-Forbidden-Service Error
Hi , Scenario: This is a B2B scenario in which the Sender Party communicates with external partner using HTTPS calls. I have enabled SSL on ABAP, installed the certificate in STRUST and created an RFC destination of Type G to connect to external syst
-
Mac OS X 10.5.8; PSE 6.0 I would like to create a layer that contains a gradient that shades from a color to transparent (not white). I can't see any way to do this since the gradient tool/color selector doesn't offer "none" as a color selection. R
-
Hi, How do we define a custom workflow to generate a report? The report is to get all the users and there attributes from LDAP. I do understand a form also has to be associated with the WF. I have no clue how to head start with custom reporting, Plea
-
Hi, My requirement is LSMW recording conversion process to bring all the data for Listing and Exclusion (VB01) from legacy system to SAP.There are 5 custom condition types for listing and exclusion and 20 scenarios. What I can do is create lsmw recor