Skip to Content
author's profile photo
Former Member

RFC_Call_Transaction problem

Hi,

I am converting a Lotus note program using rfc_call_transaction to vs.net progrma with sap connector v1.0.2 using vb.net. However I encountered the following message when I debug the program "Start screen does not exist in batch input data".

I would like to know is the following syntax the correct way to code an rfc_transaction call. The following is an extract of my coding:

Dim BDCtable As New SAPProxyDll1.BDCDATATable

Dim BDCdata As New SAPProxyDll1.BDCDATA

Dim msginf As New SAPProxyDll1.MESSAGEINF

Dim strProgram = "SAPMM06E"

BDCdata.Program = strProgram

BDCdata.Dynbegin = "X"

BDCdata.Dynpro = 105

BDCdata.Fnam = ""

BDCdata.Fval = ""

BDCtable.Add(BDCdata)

BDCdata.Program = ""

BDCdata.Dynbegin = ""

BDCdata.Dynpro = ""

BDCdata.Fnam = "BDC_OKCODE"

BDCdata.Fval = "/00"

BDCtable.Add(BDCdata).....

....

SAPProxy.Rfc_Call_Transaction("ME22", "BS", msginf, BDCtable)

What is the correct way to set up the BDC table? Or is there any sample coding for ref_call_transaction ?

Thanks and Regards

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Jul 26, 2004 at 03:45 PM

    Hi there,

    Just a quick bet ... judging on the "error message" you are getting ...

    What is the type of "BDCdata.Dynpro" ? Your code suggest int but in SAP I would write "0105" in stead of 105 ...

    Bye,

    Steven

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 26, 2004 at 05:19 PM

    First, the previous response is correct, the DYNPRO field is a string field. Second, what is the "BS" value in the UPDMODE field? That is supposed to be a 1-character field, and I usually leave it blank. But it seems you are mostly on the right track with your coding.

    Good luck with your BDC. I use it for a number of things, but it's better to use a BAPI rfc if you can. There are BAPIs for PO creation and releasing, but apparently not (in 4.6B) a PO change BAPI.

    If you change to this code it should work to get you to the next screen (dynpro) number:

    BDCdata.Program = strProgram

    BDCdata.Dynbegin = "X"

    BDCdata.Dynpro = "0105"

    BDCdata.Fnam = ""

    BDCdata.Fval = ""

    BDCtable.Add(BDCdata)

    BDCdata.Program = ""

    BDCdata.Dynbegin = ""

    BDCdata.Dynpro = "0105"

    BDCdata.Fnam = "RM06E-BSTNR"

    BDCdata.Fval = "(put PO number here)"

    BDCtable.Add(BDCdata)

    BDCdata.Program = ""

    BDCdata.Dynbegin = ""

    BDCdata.Dynpro = ""

    BDCdata.Fnam = "BDC_OKCODE"

    BDCdata.Fval = "/00"

    BDCtable.Add(BDCdata).....

    Then you would be on another screen (dynpro) so your next line would need to specify the next screen number (probably "0120" instead of "0105". Etc.

    Add comment
    10|10000 characters needed characters exceeded