Interface BdcDynpro


  • public interface BdcDynpro
    This represents a single BDC dynpro call
     Usage example using XbpInterface:
    
      import com.redwood.scheduler.api.connector.sap.rfc.scripting.RfcConnectionManager;
      import com.redwood.scheduler.api.connector.sap.rfc.scripting.xbp.XbpInterface;
      import com.redwood.scheduler.api.connector.sap.rfc.scripting.xbp.XbpWork;
      import com.redwood.scheduler.api.connector.sap.rfc.scripting.BdcDynpro;
      import com.redwood.scheduler.api.connector.sap.rfc.scripting.BdcReturn;
      import com.redwood.scheduler.api.connector.sap.rfc.scripting.BdcDynproFactory;
      import com.redwood.scheduler.api.model.SAPSystem;
      {
        SAPSystem sapSystem = jcsSession.getSAPSystemByName("NSP");
        RfcConnectionManager rfcConnectionManager = new RfcConnectionManager(sapSystem);
    
        rfcConnectionManager.callXBP(new XbpWork()
        {
          public void performWork(final XbpInterface xbp)
          {
            BdcDynpro[] bdcDynpro = new BdcDynpro[1];
            bdcDynpro[0] = BdcDynproFactory.createBdcDynpro("SAPLSUU5", "0050");
            bdcDynpro[0].addValue("BDC_OKCODE", "=SHOW");
            bdcDynpro[0].addValue("USR-02-BNAME", "USER");
            BdcReturn bdcReturn = xbp.callTransaction("SU01", bdcDynpro);
    
            BdcMessage[] msgs = bdcReturn.getMessages();
            for (BdcMessage msg : msgs)
            {
              jcsOut.println(msg.getMessageV1() + " " + msg.getMessageType() + " " + bdcReturn.getReturnCode());
            }
          }
         });
      }
    
     
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addValue​(String name, String value)
      Add a new value to this BDC dynpro call
      String getProgram()
      Get the ABAP program of this BDC dynpro call The ABAP program is set when a instance of this class is created by BdcDynproFactory
      String getScreenNumber()
      Get the screen number of this BDC dynpro call The screen number is set when a instance of this class is created by BdcDynproFactory
      Map<String,​String> values()
      Get the values of this BDC dynpro call
    • Method Detail

      • getProgram

        String getProgram()
        Get the ABAP program of this BDC dynpro call The ABAP program is set when a instance of this class is created by BdcDynproFactory
        Returns:
        name of the ABAP program
      • getScreenNumber

        String getScreenNumber()
        Get the screen number of this BDC dynpro call The screen number is set when a instance of this class is created by BdcDynproFactory
        Returns:
        screen number
      • values

        Map<String,​String> values()
        Get the values of this BDC dynpro call
        Returns:
        values as Map
      • addValue

        void addValue​(String name,
                      String value)
        Add a new value to this BDC dynpro call
        Parameters:
        name - name of the BDC field
        value - value to be set in the BDC field