Web based booking in of service orders

A company I have recently been doing work for approached me with a interesting request. They wanted a method for users to be able to book in service orders themselves, online. Vendors were not being paid on time due to the fact acknowledgment of receipt of the orders was not given in a timely fashion.
Not everyone had access to SAP for cost reasons. Also quite a few people for some reason do not like the SAP interface. The spreadsheet they generated based on a SAP report was also proving ineffective due to users overwriting acknowledged orders.
With this in mind, Myself and the local ABAP programmer came up with the following solution.
The main ingredients of the solution involve the following:
1)Windows Active Directory
2)IIS, PHP
3)BAPI_GOODSMVT_CREATE,BAPI_TRANSACTION_COMMIT,BAPI_TRANSACTION_ROLLBACK
A Windows 2000 Intranet server  was setup with  PHP and the SAPRFC extension. Using Windows authentication we now select the correct recipient for the outstanding service orders report. The local ABAP programmer wrote a function to allow me to pass the username as  a import parameter and receive the lines of outstanding orders in JTAB which I can pull off into an array using saprfc_table_read.
Here is an overview of how this works. I don't have the script in front of me. So I'm doing this from memory. I will add some more code specific detail at a later date.
1)PHP script  calls local bespoke RFC function and sends RECIPENT (username) as an import parameter. RFC function fills JTAB with outstanding orders. Items in JTAB table are LIFNR,NAME1,EBELN,EBELP,TXZ01,EINDT,OPENQTY,MEINS,NETPR,WAERS,WEMPF. Each line is then read in a loop using the number of rows returned by saprfc_table_rows.
2)The user is then presented with a form which allows them to acknowledge orders to the maximum value of OPENQTY for each line item.
3)On submission the lines are sorted by vendor. We have to run the BAPI's multiple times for each vendor. You can't book in line items from different vendors in one go. Once this is done we can start calling our BAPI's to book the items in.
4)We setup a loop by vendor which does the following:
Call BAPI_GOODSMVT_CREATE and set the import parameters GOODSMVT_HEADER & GOODSMVT_CODE.
<code>
/* Please note this is not runnable code. It's code just to get a feel of whats going on. You will need to fill in the details */
$goodsmvt_header = array('PSTING_DATE' => '20050512',
                                           'DOC_DATE'=> '20050512',
                                           'REF_DOC_NO'=> 'Jsimmons');
$goodsmvt_code = array('GM_CODE' => '01');
/*  $fhandle is from a connection we established earlier using saprfc_open & saprfc_function_discover */
saprfc_import($fhandle,'GOODSMVT_HEADER',$goodsmvt_header);
saprfc_import($fhandle,'GOODSMVT_CODE',$goodsmvt_code);
we now need to specify what items we wish to book in We have an array of line items associated with the current vendor in the outer loop which looks like this:
$lineitem = array('PO_NUMBER' => 'ponumber_from_user_form',
         'PO_ITEM'=> 'poitem_from_user_form',
        'MOVE_TYPE'=> '101',
        'MVT_IND'=> 'B',
       ' ENTRY_QNT'=> ,'number_to_book_in_from_user_form');
saprfc_table_init($fhandle,'GOODS_MVT_ITEM');
foreach ($alllineitems as $lineitem) {
  saprfc_table_append($fhandle,'GOODS_MVT_ITEM',$lineitem);
  // check for errors using saprfc_error
/* Now we need to call our first BAPI to post the items */
$errorcode = saprfc_call_and_receive ($fhandle);
// Insert Error handling code  in here
/* If the RESULTS table has entries , We have a problem */
if (saprfc_table_rows($fhandle,'RESULTS'){
    $fhandle = saprfc_function_discover($rfcconnection,'BAPI_TRANSACTION_ROLLBACK');
    $errorcode = saprfc_call_and_receive ($fhandle);
    // Insert Error handling code  in here
}else {
    $fhandle = saprfc_function_discover($rfcconnection,'BAPI_TRANSACTION_COMMIT');
    $errorcode = saprfc_call_and_receive ($fhandle);
    // Insert Error handling code  in here
saprfc_function_free($fhandle);
saprfc_close($rfconnection);
// Start loop again for next vendor
</code>
The overall results is that we now have a intranet application which allows users to easlily book in services orders. I even created a script which nags users via email to book in services orders. The nag email contains a link to the intranet page which contains the application.
Benefits:
1)Extremely cheap solution using every day tools
2)Browser based interface which everyone knows how to use.
3)Vendors are paid on time which allows the company to trade on more favorable terms.
4)Reduced administrator workload chasing people and making spreadsheets to capture outstanding service orders
I would recommend going through some of the documentation for the SAPRFC extension. This will give you an idea of what I'm trying to convey here, and fill in the gaps.
http://saprfc.sourceforge.net/src/saprfc.html
Have fun !

Jason,
Craig is correct, your posting would make an excellent weblog. Perhaps creating an accurate step-by-step with actual code would be the way to go.  You certainly will be rewarded with contribution points for your effort!
To become a weblogger just visit Submit Content in the upper Nav level. https://www.sdn.sap.com/sdn/weblogs.sdn?node=linkwnode3-6&contenttype=url&content=/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fsdn!2fiviews!2fframework!2fcom.sap.sdn.weblogs?redirect=https://weblogs.sdn.sap.com/apply/ and request to be a weblogger.  After filling out the template you will be approved.
Craig,
You seem to be doing a fantastic job of moderating and encouraging the activity in these threads.  This will be rewarded as well!
thanks,
Marilyn
SDN Community Manager

Similar Messages

  • Calculate credit amount based on a sub service order?

    Hi Experts,
    How do I calculate credit amount based on a sub service order? Is that in the COEP table? If yes what is the logic to calculate it? suppose I have sub service order number 000006009972. Thanks!
    Best regards,
    - Anthony -

    Anthony
    It might help if you decribe the business process...
    PeteA

  • Recognising Revenues based on costs in Service Orders

    We have configured SD Revenue Recognition function (ECC 5.0).  We have warranty maintenance contracts running.  On this basis we have the following scenario and issue.
    The warranty maintenance contracts are created without a billing plan (Reqmt. type SE so that we can settle costs later).  The value of which is transferred to Deferred Revenue Account and is recognised at the end of the contract period (As it bears the retention money with the customer).  Until this step things are working fine.  We use VF44 to recognise revenues.
    However, there are costs incurred (both material & labour) in relation to such contracts.  To track this, we create a Service Order s against the Service Contract for each month.  Later on fulfillment, the orders are settled to the Service Contract.  This is reflecting in the Service Order.  But the finance team wants to recognise the revenues to the extent of costs incurred.  I'm not sure how we can do this.  The following is an example scenario.
    Contract Value : $1000
    Contract period : 1 yr (1.1.2010 to 31.12.2010)
    Contract billed at the start of the year on 1.1.2010 so the amount is moved to Revenue Provision (Deferred Revenue)
    At the end of the year $1000 lying in Deferred Revenue will be moved to Revenue Account through Revenue Recognition (VF44)
    Now, costs incurred as follows which are booked in separate service orders against the contract and on completion, settled to the contract.  There is no definite schedule for these costs.
    Apr 2010 : $100
    Jun 2010 : $200
    Sep 2010 : $500
    Now, the finance team wants to recognise revenue to this extent during the relevant periods.  For eg.
    Apr 2010 :
    Deferred Revenue A/c $100
    To Revenue A/c $100
    Jun 2010 :
    Deferred Revenue A/c $200
    To Revenue A/c $200
    Sep 2010 :
    Deferred Revenue A/c $500
    To Revenue A/c $500
    And at the end of Dec 2010 :
    Deferred Revenue A/c $200
    To Revenue A/c $200
    (for the remaining amount)
    Can anyone guide me how this can be achieved?
    Thanks in advance.
    Ravi.

    Nobody have encountered this scenario?
    If not with SD Revenue Recognition, can I handle this with CO Result Analysis?
    Ravi.
    Edited by: Ravichandran S Iyer on Jul 22, 2010 2:31 PM

  • POC based Results Analysis for Service Order/ Contract

    Issue resolved. Please close the message.
    Hi Friends,
    We have a process where we create a service order and plan costs on the order.
    Later a contract will be created with billing plan. The contract is assigned to service order manually.
    After actual costs are booked to the service order the same is settled to Contract.
    When I run RA for Contract I dont see the Activity rate planned costs so the POC is not giving correct results.
    The planned material costs are being updated though.
    I have mapped the activity cost element to a line id and COS in RA configuration.
    Please let me know if I am missing anything here.
    Thanks in Advance,
    Vamsi
    Edited by: VSS on Oct 23, 2010 10:49 PM

    Hi,
    We need to implement the following OSS note:
    OSS Note 1259154.
    Also please check if 1159784
    is relevant for your system.
    Thanks,
    Vamsi

  • Creating a web based book publication with front and back covers

    I have created a book in Indesign which is 12 pages inclusive of front and back covers, the problem I'm having is that when I convert the file into an SWF file the front cover has an extra page to the left of it and the back cover has an extra page to the right of it (these pages are not in my Indesign layots) I don't want these pages as I want the document to look like a book when I send it out.  I'm assuming I haven't set the document up correctly?  I have been on a number of tutorials but none of them seem to go into this.  Some pointers would be really helpful.
    Thank you.

    You can do this in Elements. It will require planning for the layout, viz. height, and width of front & back covers, and space allocation in between for the spine area. Be sure that your printer can handle the document size.Once you have figured this out, you need to open a new, blank file of appropriate size and resolution.
    There is available a grid which I find very helpful  to facilitate alignment.
    Each of your pictures, and the blank file (#1 above), should have a resolution of 240--300px/in for good result with printing.
    The text can be produced with the type tool - optionally horizontal or vertical.
    The pictures and text will each be on their own layers, and the move tool can be used to position these components

  • Automatic Rule Determination Based on Service Order Type

    Hi Experts,
    I have a requirement to determine the rule based on the custom service order type.
    I have created 2 custom rules which are then assigned to 2 different org units as needed.
    Now the thing is i want to avoid putting condition step if else based on various order types.
    Is there any way by which i can directly determine which rule to be used by passing the Order type.
    If there is any FM then please suggest and also how to use the same.
    If no FM exists then is there a possibility of having only 1 if else condition and assign rule number in local container variables and pass it thought out the workflow to all the manual validation workitems. Please suggest how this can be achieved.
    Thanks,
    Jessica

    Hi,
    only 1 if else condition and assign rule number in local container variables and pass it
    thought out the workflow to all the manual validation workitems
    Create a workflow container element lets say with probably 15 characters length...
    Now create a background step in which you determine the rule based on the order type.
    data: lv_Rule(10) type c.
    if order_type eq 'X'.
      lv_Rule = '1234567890'.
    else.
       lv_Rule = '0123456789'.
    endif.
    " export the rule concatenated with 'AC' which indicates a rule...
    concatenate 'AC' lv_rule into ev_rule. "ev_rule size may be lets say 15 characters.
    condense ev_Rule.
    "export the EV_RULE to workflow and store it in WF cotainer element.
    In the step where you want to give the rule, select the Agent type as Expression and select the container element.
    Hope this would solve your issue.
    Regards
    Narin

  • Enhancing Web request page in Service Order in web UI

    Hi,
    We are upgrading from CRM 4 to 7 and we would like to display web request page in / from service order page. As per standard web Ui The web request & service order displayed separately, I have enhaced the view but still I'm unable to see the web request (Component:webreq) in Service order ( BT116_SERVOH). Can please gude me step by step how to enhance this in CRM 7 web UI
    Thanks & Regards,
    CHANDRA

    Hi Deepak,
    I think you may not be able to get Subject Profile field in Service Order. We had a similar problem in case of Activity Transaction. I guess this may be a bug or maybe you may need to use Categorization Schema for the purpose. Need to do more research in this area.
    Regards,
    Deepak

  • How to know I'm creating or changing the service order in ICweb?

    Hi,
    I need to disable or enable some fields based on if the service order is being created or changed . I'm new to IC web .. .can someone pelase help me understand how can I differentiate ?

    Hi,
       Which view in service order are you referring to? Normally there will be two seperate inbound plugs in the window level e.g. IP_CREATE and IP_EDIT that displays the same edit view.
    One way will be to set a flag in either of the inbound plugs for you to identity in the corresponding view whether it is a edit scenerio or a create scenerio. Depending on this flag value, you can proceed to disable fields selectively (may be in do_prepare_output method).
    Reward points if helpful!
    Thanks,
    Sudipta.

  • Consume components that are consigned in service order

    Dear CS gurus,
    Always wanted to know if this was possible:
    Current scenario
    1. We need to track materials (spare parts to repair machines) that are moved to specific customer locations. In order to do that, we are using consignment fill-up (via SD).
    NOTE: We cannot use SLoc to track these stock because there are just too many locations to track and a more feasible way is to use the consignment method.
    2. Since those items are actually spare parts to repair machines (the machines are our asset), we will make a service order (internal work order) to capture cost of repair. We need to indicate the materials that we will use in the Components tab. Since those materials are consigned to customer's site, we won't find those items in the warehouse.
    As far as I know, we cannot consume stock that are consigned ... only those in the warehouse.
    The current practice is to perform a Consignment pick-up (via SD) to bring the stock from consignment back to warehouse first. Then create the service order and maintain the materials to be used in the Components tab.
    My question:
    1. Is there anyway to actually consume the consignment stock instead of having duplicate steps as mentioned above?
    2. If not, is there a better solution for the above scenario?

    Hi
    If you consume spares against a Service order, system will automatically book the cost to that order.
    1. Move the spares to the Customer site (Consignment stock)
    2. Create a Service order when the spares are consumed
    3. issue the spares against the service order MB11, 261W mvt.
    4. Confirm the time
    Labour and Material cost will be booked against the Service order.
    Hope this is your requirement.
    I Do not agree with your statement "If I were to use MIGO to "consume" the material, I would not be able to collect the cost for the repairs of the machine."
    Babu

  • Web Based Parameter Form 6i to 10g

    I have a report that I can currenlty run using the activex control to run the report (Windows). I'm trying to move this same report to a web based report using Report Services 10g.
    How do I get the Parameter from to show up (it's a paper based report, but I want it to show the same way on the web). Basically, trying to migrate the report to the web.
    From what I've read (and understand), it seems like a LOT of work for every report to show parameters to the end user to run the report. Hopefully, I'm missing something.
    I've basically taken the report as is and put it in the correct directory on the application server. I then use the following URL, but the report blows up with a LOL error:
    http://testserver:7778/reports/rwservlet?report=MYREPORT.RDF&destype=cache&desformat=html

    Hello,
    Add the following paremeter in the URL :
    paramform=yes
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/cmdline/common/bld_paramform.htm?tp=true
    Regards

  • Service Order

    what is difference between service order with contract (SM01) and Service order with Revenue (SM02)
    Please reply in your own simple language its easy to understand
    thanx

    Hi Pankaj
    As you required i am trying in Simple Words --
    1) service order with contract (SM01) - In this type of Service Order all the expense incurred during the service i.e Material & Labour etc are posted on Service Order and all the revenues (Money received from the customer) are booked in the corresponding Sales Document. Due to this .... this type of order is called non-revenue bearing.
    2) Service order with Revenue (SM02) - In this type of Service Order along with the expense incurred the revenues are also booked to the service Order .Mean it will have both Expense & Revenue .... thats why this type of order is called as Revenue bearing .
    Regards
    Sameer

  • Service order to sales order settlement

    Hi Team,
    While settling service order to sales order via KO88, our Product Costs settled to one secondary cost element say-962100 & Labor Costs settled to secondary cost elemnt-say 968000. We need to pass journal entry for transfer labour cost to GL account manually.
    Do we have any option to post enrty to GL account"salaries & wages" at the time of settlement itself.

    Hi,
    I would like to describe the question in detail:-
    We have a client requirement in one of business scenario of   u201CService order to sales order settlementu201D:-
    Business Scenario:
    Customer sends goods for repair to us. We create a repair sales order and on saving the sales order u2013 it creates a service order.
    Goods are issued and labor costs are booked on the service order.
    Item is repaired and we bill the customer.
    At the month end,
    -     we settle the material cost and labor cost to repair sales order (hence matching cost with revenue from management books view)
    -     we settle repair sales order to COPA.
    Question/Issue:
    When the labor cost is booked on the service order, the cost center gets the credit and costs are debited to the service order. However, from accounting perspective, the costs are still sitting on the SALARIES AND WAGES GL account.
    What we need is to make an accounting entry for this labor cost to COGS u2013 OTHERS for all such labor cost booked.
    How can we achieve this?
    Thanks
    Pooja

  • How to create a billing request for service order that has serv contract?

    Dear Experts,
    Can you please help me?
    The scenario is, my client has service contracts with their customer but they want to charge customers not periorically but as and when they provide service (ad-hoc).
    So how to bill the customer in this case?
    In my testing if I have a service contract (order type = SC) then when I create service order, system automatically picks up standard order type SM01. (which is service order with contract.)
    And when I perform time confirmation and material consumption (goods issue), actual costs gets booked to the service order. However, using the service order number as referece, if I try to create a billing request in DP90, system create a blank billing request with no line items.
    So, could you please advice, how can I create a billing request for a service order, if I have a contract?
    Appreciate your help.
    Best regards,
    Abdul Rafey

    Hi Praveen,
    Thank you very much for your reply. I appreciate your time and efforts.
    Ok, these are the steps how I have executed the process.
    - I have created a service contract for an equipment. In the service contract, I have maintained the service material in the line item, maintained price and assigned equipment in the technical objects.
    - I created service notification, which automatically picked up contract.
    - When I create service order, from notification screen, system automatically picked up correct order type SM01 (Service order with contract).
    - Then I planned operations and spare parts in the service order.
    - Checked settlement rule in the service order is SDI.
    - released and saved service order.
    - Using IW42, in SAP ECC6, you can perform  both time confirmation and material consumption using the same screen and also TECO service order. System issues message to say, goods issue have been posted.
    - when you check the document flow of service order, you can see operations posted, and also goods issue posted.
    - check cost tab to see actual costs. (if I want to settle costs from service order to service contract, I can do so w/o a problem in KO88)
    - Use DP90, enter service order number and create billing request. System takes to billing request screen but it is blank. No line items.
    - So, since there is a contract, in this case, am I meant to be creating the billing request from Service contract? instead of from Service order?
    I hope I have clarified myself better this time.
    Best regards,
    Abdul Rafey

  • Service order search based on IBASE is not working

    Hi All,
    I am facing one Issue in CRM web ui..when we search service order based on the referenced installed base id it's not returning the proper result..if we have multiple service orders for the IBASE id it's returning only few values some times even though if we have service order associated with IBASE id it's not returning any value..
    I am guessing it's returning wrong result..
    I wanted to check which logic has been written for this search result or is it using any search help table.. Could you please help me where we can find the logic written for this search criteria..
    Please find the screen shot for your reference..I appreciate your help in advance..
    Thanks,
    Susan.

    Hello,
    I found the following:
    If you fill someting in the fields REFOBJ_IBASE, this value is being converted into a GUID internally
    This happens in function CRM_BSP_OIC_1O_SEARCH_FROM_RF
    So you have to make sure that the search field REFOBJ_IBASE points towards the field CRMD_SRV_REFOBJ~GUID_OBJECT ( via table CRMC_REPDY )
    And even then I have the impression it only works when you only fill the Ibase in the order. When you fill the component there is a different GUID.
    In my case I found out it is even more complex, so I will need to create my own search field (extend search structure )
    Regards,
    Erwin

  • Online Chapter on using Web-based Services

    Dear All,
    I just added a new chapter to my ["Killer Game Programming in Java"|http://fivedots.coe.psu.ac.th/~ad/jg/] website. It's about programming techniques for writing standalone programs that employ Web-based service APIs for searching Google, Amazon, eBay, and Yahoo.
    As a test-bed, I've implemented an application which sends a book title to a service, and gets back a PNG image of the book's cover. I've written five versions: one each for Google, Amazon, and eBay, and two aimed at Yahoo.
    It's chapter 33 "Using Web Service APIs", located in the "Networking" section, about 2/3 of the way down the page.
    Your comments are appreciated.
    - Andrew
    Edited by: AndrewDavison on Jun 30, 2009 2:39 AM

    rukbat wrote:
    kajbj wrote:
    Your comments are appreciated.Please don't post unsolicited announcements in these forums.
    Kaj
    Yes, I've seen that, but they are old, and I don't want to resurrect them.

Maybe you are looking for

  • Selecting Items From a List Box No Longer Works in Powershell Version 3.0

    I've noticed that the script in this powershell tip of the week no longer seems to fully work in Powershell V3. The selection dialog will pop up as expected, with all of the elments populated, but the selection is not stored in variable '$x'. Any ide

  • Licensing problem for adobe acrobat 9

    I'm trying to load up Acrobat 9 pro from my CS5 package and i keep getting an error message that says the licensing for this product has stopped working. I've uninstalled and installed it again and i don't see anywhere to put in a serial number. than

  • Inforecord value not picking in po

    Dear friends,              this is chandra shekar , here i have a problem with inforecord that in inforecord the price is 100 for that discount is 2 % that means the mat price is 98 rupees ok but when i'm creating po the system is picking only 100 ru

  • Excel printing looks out of alignment

    All in One C410A. Print works fine in all programs except MS Excel. My printouts look like the printheads are out of alighnment; both vertical and horizontal depending on the file. This did not happen until I moved to the C410. My old C309 the print

  • During APP how to display Check Register

    Dear SAP Experts, Need your help... I have a scenarion: During APP after the payemnt is done we have to do to Environmnet>Check Information>Display--> Check Register. But in FBZP for my Co Code Xyz using the payment method (A)...when i go to payment