cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Open Purchase Order.

Former Member
0 Kudos

Hi guys,

Can anyone please help me to do this.I want to display all open purchase orders in mobile. I have some selection criteria like by selecting a delivery date,all PO's need to be display.Please help me to do this...

Regards,

Sabira...

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI...The BAPI (open Purchase order) should be exposed as Rest Services so that (to receive) data can be consumed  in our Mobie device.

Regards

GI.

former_member183031
Participant
0 Kudos

Hi Sabira,

As you said you have BAPI to get all the data which gives Open sales order.
It can be possible to get the Data in mobile using Netweaver gateway and SUP.

SAPBackend<-->Netweaver GW<-->SUP<-->Relayserver<-->Device(IOS in ur case).


1) in SAP back end a service should be exposed using BAPI you mentioned, so that
   a Service Docuemnt should be available
  
   http://<ip>:<host>/POServiceDoc    ---->Service Document
 
   http://<iP>:<host>/POServiceDoc/OpenPurchaseOrder     -->Records of Open Purchase order.


2) same services should be registered in SAP netweaver gateway
3) Using SUP we can use consumed to get Open Purchase order in any mobile(IOS,BB,Andriod).

Regards
MBR.

Former Member
0 Kudos

Thanks for your reply.I have an another doubt.please clarify this.

I have used Standard BAPI named 'BAPI_GOODSMVT_CREATE' for posting goods for Open Purchase Orders.Here the import parameter would be in deep structure.So i have customized the std BAPI but still  i couldn't get it as a MBO and instead of getting it as MBO,am getting it as Attribute in Sybase Eclipse.Please help me to solve this..

former_member183031
Participant
0 Kudos

HI Banu,

Check the link or the below code may be useful for you.....

Set oBAPICtrl = CreateObject("SAP.BAPI.1")

Set oConnection = oBAPICtrl.Connection

  inipath = App.Path + ".\zdqreg.ini"

  oConnection.ApplicationServer = GetFromINI("main", "ApplicationServer", inipath)

  oConnection.SystemNumber = GetFromINI("main", "SystemNumber", inipath) 'SystemNumber of your R/3 System

   oConnection.User = GetFromINI("main", "User", inipath) 'R/3 username

  oConnection.Client = GetFromINI("main", "Client", inipath) 'R/3 Client

oConnection.Language = GetFromINI("main", "language", inipath) 'Language

oConnection.PASSWORD = decode(GetFromINI("main", "Password", inipath)) 'Password

  On Error Resume Next

   If oConnection.Logon(0, True) <> True Then

       Exit Sub

   End If

'------------------------取物料号对象区----------------------------

Set SAPFunction = CreateObject("SAP.Functions") 'SAP调用函数创建

Set SAPFunction.Connection = oConnection '把调用函数指向连接串

Set oFunc = SAPFunction.Add("ZRFC_READ_TABLE") '把对象oFunc指调用的函数名

Set oOPTIONS = oFunc.Tables("OPTIONS")

Set oFIELDS = oFunc.Tables("FIELDS")

Set oDATA = oFunc.Tables("DATA")

'-------------------------------------------------------------------

'----------------------------凭证创建对象区--------------------------

Set oFunc1 = SAPFunction.Add("BAPI_GOODSMVT_CREATE") '把对象oFunc指调用的函数名

  Set oGOODSMVT_HEADER = oFunc1.Exports("GOODSMVT_HEADER") '把对象指向GOODSMVT_HEADER(输入)

  Set oGOODSMVT_CODE = oFunc1.Exports("GOODSMVT_CODE") '把对象指向GOODSMVT_CODE(输入)

  Set oGOODSMVT_ITEM = oFunc1.Tables("GOODSMVT_ITEM") '把对象指向GOODSMVT_ITEM(TABLE输入)

  Set oRETURN1 = oFunc1.Tables("RETURN") '把对象指向RETURN(TABLE 返回)

  Set oMATERIALDOCUMENT = oFunc1.Imports("MATERIALDOCUMENT") '把对象指向返回凭证号

'--------------------------------------------------------------------

'---------------------------凭证生成对象区---------------------------

Set oFunc2 = SAPFunction.Add("BAPI_TRANSACTION_COMMIT")

Set oRETURN2 = oFunc2.Imports("RETURN") '设置返回对象

'------------

对象释放的代码:

Set oBAPICtrl = Nothing

Set SAPFunction = Nothing

oConnection.Logoff

Set oLogonCtrl = Nothing

Regards

MBR.

rohith_deraje
Advisor
Advisor
0 Kudos

Hi Sabira,

can you please provide some more details?

Are you using SAP released app "SAP ERP Order Status"?  Or trying to develop a mobile application?

Where you are facing the problem? In fetching the open order OR in displaying the results in mobile screen?

Are you using gateway?

If not already seen this, please check for "SAP ERP Order status" app once.http://scn.sap.com/community/mobile/blog/2012/09/10/mobile-app-mondays--keep-yourself-on-the-right-t...

Regards

Rohith

Former Member
0 Kudos

Thanks for your response.

Am trying to create a mobile application in Sybase Unwired Platform to display all Open PO's from SAP System to mobile device.I have searched related BAPI's to display all open PO's from SAP.but couldn't find it.So please help me to do this..

sujith_prathap
Advisor
Advisor
0 Kudos

The most simplest question would be to ask is you have configured the Application Endpoint on the SUP to your service document on the gateway?

You usually do not get any data if this is the case.

Please refer to this document. It is a 101 on using SUP.

http://scn.sap.com/docs/DOC-23532