cancel
Showing results for 
Search instead for 
Did you mean: 

Can you help with problems with REPMAN BAPI

Former Member
0 Kudos

We are just starting to use the SAP Dot.Net Connector and are struggling to get documentation on how to use the repetitive manufacturing BAPIs - where do we get hold of this type of information?

For Example, on Bapi_Repmanconf_Create_Mts what should be in Pdc_Number and Bckfltype?

The code below does not return an error, but does not return a serial number either. How can we amend the quantities on backflush component materials?

using System;

using System.Collections;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Web;

using System.Web.SessionState;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.HtmlControls;

namespace SAPTest1

{

/// <summary>

/// Summary description for WebForm1.

/// </summary>

public class WebForm1 : System.Web.UI.Page

{

protected System.Web.UI.WebControls.Button Button2;

protected System.Web.UI.WebControls.DataGrid DataGrid1;

private void Page_Load(object sender, System.EventArgs e)

{

// Put user code to initialize the page here

}

#region Web Form Designer generated code

override protected void OnInit(EventArgs e)

{

//

// CODEGEN: This call is required by the ASP.NET Web Form Designer.

//

InitializeComponent();

base.OnInit(e);

}

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

this.Button2.Click += new System.EventHandler(this.Button2_Click);

this.Load += new System.EventHandler(this.Page_Load);

}

#endregion

private void Button2_Click(object sender, System.EventArgs e)

{

// Declare parameters here

string Connstr = "ashost=q1b.cp.chbs sysnr=01 client=10 passwd=unlucky type=3 user=m190325";

SAPProxy3 proxy = new SAPProxy3(Connstr);

proxy.Connection.Open();

// Call methods here

BAPI_RM_DATGEN BflushDataGen = new BAPI_RM_DATGEN();

BAPI_RM_DATSTOCK Bflushdatamts = new BAPI_RM_DATSTOCK();

BAPI_RM_FLG Bflushflags = new BAPI_RM_FLG();

BAPIRET2 retVal = new BAPIRET2();

BAPI_RM_DATSERIALTable myTable = new BAPI_RM_DATSERIALTable();

BflushDataGen.Pdc_Number = "23.07.04";

BflushDataGen.Prodversion = "0001";

BflushDataGen.Backflquant = 8363;

BflushDataGen.Storageloc = "G1";

BflushDataGen.Unitofmeasure = "KG";

BflushDataGen.Batch = "HUD462145";

BflushDataGen.Planorder = "0001416609";

BflushDataGen.Postdate = "23.07.04";

BflushDataGen.Docdate = "23.07.04";

BflushDataGen.Docheadertxt = string.Empty;

BflushDataGen.Materialnr = "1004235";

BflushDataGen.Planplant = "1701";

BflushDataGen.Prodplant = "1701";

BflushDataGen.Prodline = "PMGG1";

Bflushdatamts.Reppoint = "";

Bflushflags.Bckfltype = "Assembly Backflush";

proxy.Bapi_Repmanconf_Create_Mts(BflushDataGen,Bflushdatamts,Bflushflags,out retVal, ref myTable);

DataGrid1.DataSource = myTable;

DataGrid1.DataBind();

Response.Write("Message : " + retVal.Message + "<br>");

Response.Write("Message_V1 : " + retVal.Message_V1 + "<br>");

Response.Write("Message_V2 : " + retVal.Message_V2 + "<br>");

Response.Write("Message_V3 : " + retVal.Message_V3 + "<br>");

Response.Write("Message_V4 : " + retVal.Message_V4 + "<br>");

Response.Write("Number : " + retVal.Number + "<br>");

Response.Write("Parameter : " + retVal.Parameter + "<br><br>");

}

}

}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Since posting this I have found web site http://ifr.sap.com/catalog/query.asp which has most of the information we need.