Place Computer in Specific OU based on Current IP Address during OSD

I have Googled and searched these forums and still have not found this.. I am sure this is possible... Hoping someone can point me in the right direction or share the How to Knowledge.
Thanks!

Are you running ConfigMgr 2012 R2?
If you are, then you could do this with dynamic task sequence variables. Basically this dynamic variable is setted to your needs (the OU) according to the gateway the system has configured.
After the variable has been setted, you could use a script to move the computer to that OU during the deployment. More on this here:
http://ccmexec.com/2010/12/move-computer-to-the-correct-ou-during-deployment/

Similar Messages

  • SCCM2012 SP1: rename computer to MAC address during OSD

    Dears, i'm trying to rename the computers during the OSD process to it's MAC addresses. i want to do it by SCCM only without MDT integration because we have SCCM SP1 and MDT 2012 and we're tending to deploy Windows 8.1. and we're alredy deploying Windows 8.1
    with no issues. i'm using the following script: 
    Set env = CreateObject("Microsoft.SMS.TSEnvironment")
    Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI")
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") 
    Set IPConfigSet = objWMIService.ExecQuery("SELECT MACAddress FROM Win32_NetworkAdapterConfiguration " & "WHERE IPEnabled=true" )
    ProgressUI.CloseProgressDialog  
    For Each IPConfig In IPConfigSet
      env("OSDComputerName") = Left(Replace(IPConfig.MACAddress,":",""),12)
      WScript.Echo env("OSDComputername")
    Next
    and i'm using it in a  package after apply operating system step as shown in the following snapshot:
    however the machine get named Minintxxxx and the step gives code 0 as a return code which means successfully completed.
    any help please?

    Dears, so sorry for the late reply. here's a part from the SMSTS.log for the setting computer name step with script in the upper post
    TSManager 11/6/2014 9:10:05 AM
    1244 (0x04DC)
    Expand a string: WinPEandFullOS TSManager
    11/6/2014 9:10:05 AM 1244 (0x04DC)
    Executing command line: smsswd.exe /run:PR1000DA cmd.exe /c cscript.exe ADEC_ComputerName.vbs
    TSManager 11/6/2014 9:10:05 AM
    1244 (0x04DC)
    [ smsswd.exe ] InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    PackageID = 'PR1000DA' InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    BaseVar = '', ContinueOnError='' InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    ProgramName = 'cmd.exe /c cscript.exe ADEC_ComputerName.vbs'
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    SwdAction = '0001' InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    ResolveSource flags: 0x00000000 InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    SMSTSPersistContent: . The content for package PR1000DA will be persisted
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    DownloadOnDemand flag is true. Attempting to download content locally for Package PR1000DA..
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Package Flags: 0x1000000 InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    GetDirectoryListing() entered InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Initializing HTTP transport. InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
       Setting URL = http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/PR1000DA.
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
       Address=http://APDC01CFG05.adec.ae, Scheme=http, Object=/SMS_DP_SMSPKG$/PR1000DA, Port=80.
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
       Setting Authenticator. InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Set authenticator in transport InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    WinHttp credentials set InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    CLibSMSMessageWinHttpTransport::Send: URL: APDC01CFG05.adec.ae:80  PROPFIND /SMS_DP_SMSPKG$/PR1000DA
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Request was succesful. InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    DAV response string is: 
     <?xml version="1.0" encoding="utf-8" ?><D:multistatus xmlns:D="DAV:"><D:response><D:href>http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/sccm?/PR1000DA/</D:href><D:propstat><D:status>HTTP/1.1
    200 OK</D:status><D:prop><D:getcontenttype/><D:supportedlock/><D:getetag/><D:creationdate/><D:iscollection>1</D:iscollection><D:resourcetype><D:collection/></D:resourcetype><D:ishidden>0</D:ishidden><D:displayname>http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/sccm?/PR1000DA/</D:displayname><D:getlastmodified></D:getlastmodified><D:getcontentlanguage/><D:getcontentlength>0</D:getcontentlength></D:prop></D:propstat></D:response><D:response><D:href>http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/PR1000DA/sccm?/ADEC_ComputerName.vbs</D:href><D:propstat><D:status>HTTP/1.1
    200 OK</D:status><D:prop><D:getcontenttype/><D:lockdiscovery/><D:supportedlock/><D:getetag/><D:getcontentlanguage/><D:iscollection>0</D:iscollection><D:creationdate/><D:resourcetype/><D:ishidden>0</D:ishidden><D:displayname>http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/PR1000DA/sccm?/ADEC_ComputerName.vbs</D:displayname><D:getlastmodified>Wed,
    05 Nov 2014 12:10:59 GMT</D:getlastmodified><D:getcontentlength>527</D:getcontentlength></D:prop></D:propstat></D:response><D:response><D:href>http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/PR1000DA/sccm?/Dump_Var.vbs</D:href><D:propstat><D:status>HTTP/1.1
    200 OK</D:status><D:prop><D:getcontenttype/><D:lockdiscovery/><D:supportedlock/><D:getetag/><D:getcontentlanguage/><D:iscollection>0</D:iscollection><D:creationdate/><D:resourcetype/><D:ishidden>0</D:ishidden><D:displayname>http://APDC01CFG05.adec.ae/SMS_DP_SMSPKG$/PR1000DA/sccm?/Dump_Var.vbs</D:displayname><D:getlastmodified>Sun,
    02 Nov 2014 10:13:02 GMT</D:getlastmodified><D:getcontentlength>125</D:getcontentlength></D:prop></D:propstat></D:response></D:multistatus>
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    List of files to be downloaded InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
      File: http://APDC01CFG05.adec.ae:80/SMS_DP_SMSPKG$/PR1000DA/sccm?/ADEC_ComputerName.vbs
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
      File: http://APDC01CFG05.adec.ae:80/SMS_DP_SMSPKG$/PR1000DA/sccm?/Dump_Var.vbs
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    GetDirectoryListing() successfully completed
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Succeeded loading resource DLL 'X:\sms\bin\x64\1033\TSRES.DLL'
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Downloaded file from http://APDC01CFG05.adec.ae:80/SMS_DP_SMSPKG$/PR1000DA/sccm?/ADEC_ComputerName.vbs to D:\_SMSTaskSequence\Packages\PR1000DA\ADEC_ComputerName.vbs
    InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Downloaded file from http://APDC01CFG05.adec.ae:80/SMS_DP_SMSPKG$/PR1000DA/sccm?/Dump_Var.vbs to D:\_SMSTaskSequence\Packages\PR1000DA\Dump_Var.vbs
    InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Download done setting progress bar to 100 InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    VerifyContentHash: Hash algorithm is 32780 InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Failed to open Software\Microsoft\Sms\Mobile Client\Software Distribution registry key. The client should not get checked for RWH OpLock Type
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Failed to open Software\Microsoft\Sms\Mobile Client\Software Distribution registry key. The client should not get checked for RWH OpLock Type
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Content successfully downloaded at D:\_SMSTaskSequence\Packages\PR1000DA
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Resolved source to 'D:\_SMSTaskSequence\Packages\PR1000DA'
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Command line for extension .exe is "%1" %*
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Set command line: Run command line InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Working dir 'D:\_SMSTaskSequence\Packages\PR1000DA'
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Executing command line: Run command line InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Process completed with exit code 1 InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Microsoft (R) Windows Script Host Version 5.8
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Copyright (C) Microsoft Corporation. All rights reserved.
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Input Error: There is no script engine for file extension ".vbs".
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Command line returned 1 InstallSoftware
    11/6/2014 9:10:05 AM 1740 (0x06CC)
    Entering ReleaseSource() for D:\_SMSTaskSequence\Packages\PR1000DA
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    reference count 1 for the source D:\_SMSTaskSequence\Packages\PR1000DA before releasing
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Released the resolved source D:\_SMSTaskSequence\Packages\PR1000DA
    InstallSoftware 11/6/2014 9:10:05 AM
    1740 (0x06CC)
    Process completed with exit code 1 TSManager
    11/6/2014 9:10:05 AM 1244 (0x04DC)
    TSManager 11/6/2014 9:10:05 AM
    1244 (0x04DC)
    Failed to run the action: Get OSDComputerName. 
    Incorrect function. (Error: 00000001; Source: Windows)
    TSManager 11/6/2014 9:10:05 AM
    1244 (0x04DC)
    i'm so confused about the "Input Error: There is no script engine for file extension ".vbs"." 
    any help please!!

  • FM to get the previous sunday date based on current date(sy-datum)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma
    Moderator Message: Basic date related questions are not allowed
    Edited by: Suhas Saha on Sep 19, 2011 11:39 AM

    Hi,
    There are function modules to find out the current day of the week depending on sy-datum. These are as below:
    1. DATE_COMPUTE_DAY - Returns a number indicating what day of the week the date falls on. e.g. Monday is returned as a 1, Tuesday as 2,...., Sunday as 7.
    2. RH_GET_DATE_DAYNAME  - Returns the day based on the date provided, e.g. Monday, Tuesday,..., Sunday.
    Using any of the above, if you can find out the current day, then you can calculate and compute the date of the previous Sunday.
    My observation is that using the first FM might make the calculation simpler.
    Hope this is of help to you.
    Regards,
    Shayeree

  • OBIEE filter result based on current day of Month

    Dears,
    I am running an exercise to restrict all available data in my table based on current day of month (less than or equal to), what I am having a trouble in is that when I create a variable in prompt (just to test the query) the below sentence works where when adding it the Criteria body an error happens:
    SELECT DayOfMonth(CURRENT_DATE)-3 FROM  "Anysubjectarea" (it works)
    but the below won't:
    Error getting drill information: SELECT  Month("DIM_TIME"."MONTH") saw_1, Day("DIM_TIME"."DAY") saw_2 FROM "AGGR_REVENUE" WHERE ("DIM_TIME"."YEAR_ID" IN (2014, 2015)) AND (Day("DIM_TIME"."DAY") <= (SELECT DayOfMonth(CURRENT_DATE)-3 FROM "AGGR_REVENUE"))
    any help?
    Moreover, I have no rich experience in OBIEE, is not there any place to test the query before applying it? If it's a product of ORACLE, why Select sysdate from dual is not working work???
    P.s: I have no access to create a repository variable

    Hi,
    Why do you want to use a "SELECT ...." in your filter? There is no added value in having a subquery in the filter except a slower analysis in your case.
    Just add a filter to your "DIM_TIME"."DAY" column and check the "convert this filter to SQL".
    And just write your condition there :
    Done !
    In the Administration you have a link named "Issue SQL" where you can enter LSQL and execute it if you want.
    For your last point I guess you are forgetting what OBIEE is ... "Select sysdate from dual" is a query for Oracle Database, OBIEE doesn't "speak" SQL but uses LSQL, so you need to use the correct syntax for LSQL. Also the point of OBIEE is to hide your sources and not be limited by the physical source available in your RPD. Did you try to run a "Select sysdate from dual" against an Excel file? Does it work? Not really (or you have a really smart Excel).
    But if you run the same LSQL against an Oracle DB, an Excel file, an Essbase cube they all give you the same result: that's the power of LSQL, adding an abstraction layer on top of your multiple physical sources and have a single language to interact with all of them ...

  • How can I filter a Sharepoint 2007 libarry list based on current user login?

    Hi all.
    I would like to know how I can filter a SharePoint library list based on current user login.
    Suppose I have created the followings:
    1) A SharePoint form library containing bunch of uploaded InfoPath form data.
    2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.
    I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.
    I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value
    to that of "TargetUser".
    I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.
    I have googled this subject for hours but I have not found any solution.
    It would be greatly appreciated if anyone can help me to create a functional filtered list.
    FYI, my SharePoint 2007 installation is just WSS 3.0 + Form Server. I do not have MOSS 2007 (so no MOSS 2007 web parts or web services).
    Thank you.
    Jason

    Here's what I usually do in order to accomplish this.  Ultimately you'll need to have 2 different fields.  There's the one you already have, with DOMAIN\username stored in it.  Then you'll need an additional field as a "person" column type. 
    Call it "TargetPerson" or something.
    Create a sharepoint designer workflow that runs each time an item is created or changed.  One action:
    Set FIELD to VALUE.
    The first FIELD is "TargetPerson", the VALUE is your "TargetUser" field. 
    Once this is done, then the person value is stored in the person field.  This is the field that you can filter by "TargetPerson" is equal to [Me]
    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura

  • OIM - Email notification to a specific user based on a dynamic rule

    Hello, After creation of account in a particular target resource I need to send an email to a specific user based on the location of the user (e.g area admin).
    In the notification tab of process tasks, I see only "Assignee", "Requestor", "User", "User Manager"? How can I achive the above specified requirement?
    Before posting this question, I tried to search the forum for any previous posts related to this. But I couldn't find any. May be I was not searching with right key words.
    Any help is appreciated. Thanks in advance.

    You'll need to custom code an adapter to send the email, then you can send to any user you want. Create a new task and trigger it off the completion response code. You can use the following apis:
    tcEmailNotificationUtil sendMail = new tcEmailNotificationUtil(ioDatabase);
    sendMail.setBody("Type your body here or use a string variable");
    sendMail.setSubject("Type your subject here or use a string variable");
    sendMail.setFromAddress("[email protected]");
    sendMail.sendEmail("[email protected]");
    Just populate the above pieces with the information needed.
    -Kevin

  • My daughter is currently using my Apple ID with her ipod touch.  I will be upgrading her to an iPhone 4S and would like to use a differnt Apple ID and a new computer and still keep all the current music and apps that she has now.  How do I do this?

    My daughter is currently using my Apple ID with her ipod touch.  I will be upgrading her to an iPhone 4S and would like to use a different Apple ID and a new computer and still keep all the current music and Apps that she has now.  How do I do this?

    Make a new Apple ID for her.
    Use it on her iPhone 4S for iCloud, iMessage and FaceTime.
    Use your ID on her iPhone 4S for iTunes and App Stores.
    Sign in with your Apple ID on iTunes Store (on iTunes app of her new computer)
    Authorize her new computer with your Apple ID in iTunes (iTunes menu>Store>Authorize this Computer)
    Check "Share my Library on my Local Network" in iTunes Preferences in your and her computer
    Sign in Home Sharing of her iTunes with your Apple ID.
    Copy all the Music she wants from the old computer to the new one. (Must be on the same network)
    Copy all the apps she wants from the old computer to the new one. (Must be on the same network)
    Export all playlist as xml files from the old computer to the new one.(right click on the playlist to export and "File>Library>Import Playlist to Import)
    Sync her iPhone 4S with all content she wants from her new computer (all data from the old computer will be deleted)
    Are you sharing Contacts or other data from iCloud?
    Be careful or ask for help about moving from iCloud account to another one.

  • TS1277 I bought a new computer and itunes request me to authorize the new computer.  Howerver it is using an email address I have not had for over 4 years and will not accept my current authorization information.  How do I get it to accept my new computer

    After purchasing a new computer I downloaded itunes and signed in to my account.  Everything was fine including my current email address.  When I connected my iPod and it started to cink, I go a message that the computer had to be authorized our my music would be removed.  When I clicked on the authorize button I got a sign in that had an email address I have not had in almost 3 years.  When I put my current logon and password in itunes would not accept it.  When I clicked help it offered to send help to my old email address which I have not way of accessing.  How do I get my computer to accept my iPod if I cannot enter the current logon and password information?

    We are having this same issue.  We have over 200 songs that are now missing and only our most recent ones show up in our ITunes library.  Fortunately we have one phone that still has all of our music still in tact. This phone is no longer one I will be using as I upgraded to the Iphone 6, and only the most recent purchased songs remain.  The rest are no where to be found and the iTunes store shows that I would need to re-purchase.  Not sure what to do as when I tried to sync my last phone, all the songs were gone.

  • How do you send an email to a specific person based on if a particular check box is checked?

    How do you send an email to a specific person based on if a particular check box is checked?

    Try the LiveCycle Designer forum.

  • Need to send notification to a specific person based on condition

    Please help.
    I need to send notification to a specific person based on condition. When a specific hold is placed on an invoice, send a notification to the Buyer who is referenced on the Purchase Order that is associated with that invoice. It will be an FYI notification.
    I'm looking at APINVHDN AP Hold Maiin Process. I thought possibly adding a notification into the "No" condition after the GET_APPROVER function since there would not be an approver on the invoice since it's on hold.
    Any ideas would be very much appreciated.

    Try the LiveCycle Designer forum.

  • Assign Task to a specific user based on the value of DDL from the form

    Hello,
    Can any one please advise me on how to assign a task to a specific user based on the value of the drop down list from the form. E.g. user fills the form and before they submit the form they have to select one of the name from the drop down list so the form can go to that person for approval.
    Thanks in advance,
    Han

    I got it works now by using the xpath expression (in workbench) to assign to the selected user from the DDL in the form.

  • I need to reinstall my original factory disc and reset my computer to the beginning. It currently has lion. Do I need to erase my HD first to clear and make new room for the install disc.

    I need to reinstall my original factory disc and reset my computer to the beginning. It currently has lion. Do I need to erase my HD first to clear and make new room for the install disc.

    Prepare Your Mac for Sale
    Boot from the OS X Installer Disc One that came with the computer.  After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.  After DU loads select the startup volume from the left side list then click on the Erase tab.  Set the format type to Mac OS Extended (Journaled) then click on the Options button.  Select the one pass Zero Data option and click on the OK button.  Then click on the Erase button.
    Note: You can skip the Zero Data option if you are not concerned about removing sensitive personal data from the hard drive.  If you choose to skip this part of the process then it is possible for others to recover data from the hard drive.  The Zero Data procedure will prevent others from getting access to your personal information.
    This process will take 30 minutes to several hours depending upon the size of the hard drive.  After formatting has completed quit DU and return to the installer.  Now complete the OS X installation.  At the completion of the installation do not restart the computer.  Instead just shut it off.  The next user will be presented with the Setup Assistant when they turn on the computer just as it would if new out of the box.

  • I want to move syncing my iphone from one computer to another. (windows based) Is there a one stop way to do this?

    I want to move syncing my iphone from one computer to another. (windows based) Is there a one stop way to do this?
    Thanks

    Copy everything from one computer to the other then sync.

  • Business Place by default in MIRO based on PO

    Hi,
    I have a requirement where I need to default a value in the business place (BUPLA) field in MIRO based on the site(plant) in the PO.
    please help me how to achieve this.
    thanks in advance,
    kumar

    Hi Kumar, i feel that you might need ABAP help to achieve this .. still check the following threads
    Re: Business place / Section Code as default value while MIRO / FB60

  • FM to get previous sunday date based on current date(SY-DATUM)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma

    Hi Kapil,
    You can follow the logic below:
    data:
    l_date like sy-datum, **TODAY
    l_date2 like sy-datum, **Previous Sunday
    data:
    l_daynr like HRVSCHED-DAYNR.
    *Get today's date
    l_date = sy-datum.
    *Gey today's day (Monday, Tuesday, etc.)
    CALL FUNCTION 'HRIQ_GET_DATE_DAYNAME'
    EXPORTING
    langu = 'EN'
    date = l_date
    IMPORTING
    daynr = l_daynr.
    CASE l_daynr.
    *If it is Monday
    WHEN 1.
    -Subtract 2 days for the previous Sunday
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 2
    IMPORTING
    ed_date = l_date2.
    *If it is Tuesday
    WHEN 2.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 3
    IMPORTING
    ed_date = l_date2.
    *If it is Wednesday
    WHEN 3.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 4
    IMPORTING
    ed_date = l_date2.
    *If it is Thursday
    WHEN 4.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 5
    IMPORTING
    ed_date = l_date2.
    *If it is Friday
    WHEN 5.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 6
    IMPORTING
    ed_date = l_date2.
    *If it is Saturday
    WHEN 6.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 7
    IMPORTING
    ed_date = l_date2.
    *If it is Sunday
    WHEN 7.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 8
    IMPORTING
    ed_date = l_date2.
    ENDCASE.
    Regards,
    Dilek

Maybe you are looking for