<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MAKE AN ENTRY IN ALL REQUIRED FIELDS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011504#M958445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, run the transaction SAPgui, and make sure that you are filling all fields that are required while running in SAPgui.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 16:41:55 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2008-06-17T16:41:55Z</dc:date>
    <item>
      <title>MAKE AN ENTRY IN ALL REQUIRED FIELDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011503#M958444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I AM USING THE FOLLOWING EXCEL VBA CODE TO TRY AND CALL A TRANSACTION LX02 DIRECT INTO EXCEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Public Sub add_bdcdata(BdcTable As Object, program As String, dynpro As String, dynbegin As String, fnam As String, fval As String)

Dim vField As Variant

j = j + 1

BdcTable.Rows.Add

BdcTable.Value(BdcTable.Rows.Count, "PROGRAM") = "RLS10020"
BdcTable.Value(BdcTable.Rows.Count, "DYNPRO") = "1000"
BdcTable.Value(BdcTable.Rows.Count, "DYNBEGIN") = "X"
BdcTable.Value(BdcTable.Rows.Count, "FNAM") = "BDC_OKCODE"
BdcTable.Value(BdcTable.Rows.Count, "FVAL") = "NEXT"

Debug.Print BdcTable.Value(j, "FVAL")
End Sub

Public Sub rfc_call_transaction()
Dim Functions As Object
Dim RfcCallTransaction As Object
Dim Messages As Object
Dim BdcTable As Object

'***************************************************************************
' Create the Function control (that is, the high-level Functions collection):
'***************************************************************************
Set Functions = CreateObject("SAP.Functions")

'***************************************************************************
' Set the rest of Connection object values:
'***************************************************************************
Functions.Connection.System = "QA2"
Functions.Connection.client = "900"
Functions.Connection.user = "mbrough"
Functions.Connection.Password = "st34lhv3"
Functions.Connection.Language = "EN"

If Functions.Connection.Logon(0, False) &amp;lt;&amp;gt; True Then
Exit Sub
End If

Dim iBOB As Integer
iBOB = Range("A1")
Do

'*****************************************************************************
' Retrieve the Function object (the Connection object must be set up before Function objects can be created):
'*****************************************************************************
Set RfcCallTransaction = Functions.Add("RFC_CALL_TRANSACTION")

'*****************************************************************************
' Set the export parameters
'*****************************************************************************

RfcCallTransaction.exports("TRANCODE") = "LX02"
RfcCallTransaction.exports("UPDMODE") = "S"
Set BdcTable = RfcCallTransaction.Tables("BDCTABLE")

'*****************************************************************************
' Set the tables parameter and add the data for the call transaction
'*****************************************************************************
add_bdcdata BdcTable, "RLS10020", "1000", "X", "", ""
add_bdcdata BdcTable, "", "", "", "BDC_CURSOR", "S1_LGNUM"
add_bdcdata BdcTable, "", "", "", "BDC_OKCODE", "=ONLI"
add_bdcdata BdcTable, "", "", "", "S1_LGNUM", "900"
add_bdcdata BdcTable, "", "", "", "S1_LGNUM", "ActiveCell"
add_bdcdata BdcTable, "", "", "", "S1_LGTYP-LOW", "K01"
add_bdcdata BdcTable, "", "", "", "BDC_SUBSCR", "SAPLSSEL"
add_bdcdata BdcTable, "", "", "", "BDC_SUBSCR", "SAPLSSEL"
add_bdcdata BdcTable, "SAPMSSYO", "0120", "X", "", ""
add_bdcdata BdcTable, "", "0", "", "BDC_OKCODE", "=BACK"
add_bdcdata BdcTable, "RLS10020", "1000", "X", "", ""
add_bdcdata BdcTable, "", "", "", "BDC_OKCODE", "/EE"
add_bdcdata BdcTable, "", "", "", "BDC_CURSOR", "S1_LGNUM"
add_bdcdata BdcTable, "", "", "", "S1_LGNUM", ActiveCell.Value

'******************************************************************************
'End SubCall the function (if the result is false, then display a message):
'******************************************************************************
If RfcCallTransaction.Call = True Then
Set Messages = RfcCallTransaction.imports("MESSG")
MsgBox Messages.Value("MSGTX")
Else
MsgBox " Call Failed! error: " + GetCustomers.Exception
End If
iBOB = iBOB + 1
Loop Until IsEmpty(ActiveCell.Offset(iBOB, 0))

Functions.Connection.Logoff
End Sub&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I KEEP GETTING AN ERROR MESSAGE SAYING 'MAKE AN ENTRY IN ALL REQUIRED FIELDS' AND THEN NOTHING DOWNLOADS INTO EXCEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAN ANYONE HELP PLEASE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 16:38:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011503#M958444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T16:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: MAKE AN ENTRY IN ALL REQUIRED FIELDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011504#M958445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, run the transaction SAPgui, and make sure that you are filling all fields that are required while running in SAPgui.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 16:41:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011504#M958445</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-06-17T16:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: MAKE AN ENTRY IN ALL REQUIRED FIELDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011505#M958446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run this transaction through SAPgui I only have to fill out the field S1_LGNUM, and I have specified this in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my code below correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Public Sub add_bdcdata(BdcTable As Object, program As String, dynpro As String, dynbegin As String, fnam As String, fval As String)

    Dim vField As Variant
    Static j As Integer
    
    j = j + 1
    BdcTable.Rows.Add
    
    BdcTable.Value(j, "PROGRAM") = "RLS10020"     ' Program Name
    BdcTable.Value(j, "DYNPRO") = "1000"        ' Dynpro Number
    BdcTable.Value(j, "DYNBEGIN") = "X"    ' X if a screen
    BdcTable.Value(j, "FNAM") = "BDC_OKCODE"            ' Field Name
    BdcTable.Value(j, "FVAL") = "NEXT"            ' Field Value
End Sub&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i have seen this in examples where it looks like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Public Sub add_bdcdata(BdcTable As Object, program As String, dynpro As String, dynbegin As String, fnam As String, fval As String)

    Dim vField As Variant
    Static j As Integer
    
    j = j + 1
    BdcTable.Rows.Add
    
    BdcTable.Value(j, "PROGRAM") = program    ' Program Name
    BdcTable.Value(j, "DYNPRO") = dynpro        ' Dynpro Number
    BdcTable.Value(j, "DYNBEGIN") = dynbegin    ' X if a screen
    BdcTable.Value(j, "FNAM") = fnam            ' Field Name
    BdcTable.Value(j, "FVAL") = fval            ' Field Value
End Sub&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 10:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011505#M958446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: MAKE AN ENTRY IN ALL REQUIRED FIELDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011506#M958447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 09:09:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-an-entry-in-all-required-fields/m-p/4011506#M958447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T09:09:57Z</dc:date>
    </item>
  </channel>
</rss>

