I need more than 255 charater value return from the table control screen.

Hi guys,
I used this function module to get the dynamic table control value changes, but it export me back only 255 character value.
because the 'DYNPFIELDS' internal table structure hold only 255 character. kindly help me in this reg to get more than 255 character length.
or any other solution.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      DYNAME     = '/A1SSPC/USR_RALG_FILL'
      DYNUMB     = '1000'
    TABLES
      DYNPFIELDS = TBDYNPFIELDS.
kindly provide me if you have any solution.
reg,
hari

Hi,
Try using the Text Editor for more info go throught the Control Examples
Utilities--> Examples -->  Control Examples in SE38
Regards
Ramchander Rao.K

Similar Messages

  • The value returned from the load function is not of type numeric  errors after migration to Coldfusion 11

    I am currently testing our website with CF11. It is currently working with CF8 however after migrating it to a new server running CF11 I have encountered the following error.
    The value returned from the load function is not of type numeric.
    The error occurred in
    D:/Applications/CFusion/CustomTags/nec/com/objects/address.cfc: line 263
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/contact.cfc: line 331
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 510
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 1675
    Called from D:/website/NECPhase2/action.validate.cfm: line 54
    261 : <cfif isNumeric(get.idCountry)>
    262 : <cfset rc = this.objCountry.setID(get.idCountry)>
    263 : <cfset rc = this.objCountry.load()>
    264 : </cfif>
    265 : <cfset this.sPostcode = get.sPostcode>
    Have there been any changes between CF8 and CF11 that could  cause this error?
    Does anyone have ideas?

    This is the code in file object file country.cfc (nec.com.objects.country):
    <cfcomponent displayname="Country object" hint="This is a Country object, it allows you to access and set values in the Country.">
    <!---
    // Construct this object
    --->
    <cfset this.objFunctions = CreateObject( 'component', 'nec.com.system.functions' )>
    <cfscript>
      this.idCountryID = 0;
      this.sCountryName = "";
      this.sISOCode = "";
      this.sDHLCode = "";
      this.iErrorID = "";
    </cfscript>
    <!---
    // The following functions are the setters and getters. offering us a better way to get
    // at the contents of the object
    --->
    <!---
    // Getters
    --->
    <cffunction name="getID" displayname="Get ID" returntype="numeric" output="false" hint="This returns the ID of the current item.">
      <cfreturn this.idCountryID>
    </cffunction>
    <cffunction name="getsCountryName" displayname="Get sCountryName" returntype="string" output="false" hint="This gets the sCountryName value of this item.">
      <cfreturn this.sCountryName>
    </cffunction>
    <cffunction name="getsISOCode" displayname="Get sISOCode" returntype="string" output="false" hint="This gets the sISOCode value of this item.">
      <cfreturn this.sISOCode>
    </cffunction>
    <cffunction name="getsDHLCode" displayname="Get sDHLCode" returntype="string" output="false" hint="This gets the sDHLCode value of this item.">
      <cfreturn this.sDHLCode>
    </cffunction>
    <cffunction name="iError" displayname="Get iError" returntype="numeric" output="false" hint="This returns the iError of the current item.">
      <cfreturn this.iError>
    </cffunction>
    <!---
    // Setters
    --->
    <cffunction name="setID" displayname="Set ID" returntype="boolean" output="false" hint="This sets the ID value of this item.">
      <cfargument name="idCountryID" required="true" type="numeric" displayname="ID" hint="The ID to use.">
      <cfset this.idCountryID = arguments.idCountryID>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsCountryName" displayname="Set sCountryName" returntype="boolean" output="false" hint="This sets the sCountryName value of this item.">
      <cfargument name="sCountryName" required="true" type="string" displayname="sCountryName" hint="The sCountryName to use.">
      <cfset this.sCountryName = arguments.sCountryName>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsISOCode" displayname="Set sISOCode" returntype="boolean" output="false" hint="This sets the sISOCode value of this item.">
      <cfargument name="sISOCode" required="true" type="string" displayname="sISOCode" hint="The sISOCode to use.">
      <cfset this.sISOCode = arguments.sISOCode>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsDHLCode" displayname="Set sDHLCode" returntype="boolean" output="false" hint="This sets the sDHLCode value of this item.">
      <cfargument name="sDHLCode" required="true" type="string" displayname="sDHLCode" hint="The sDHLCode to use.">
      <cfset this.sDHLCode = arguments.sDHLCode>
      <cfreturn true>
    </cffunction>
    <!---
    // Clear, to empty out the contents of this object
    --->
    <cffunction name="clear" displayname="Clear items Details" returntype="boolean" output="false" hint="Clears out all of the items details.">
      <cfscript>
       this.sCountryName = "";
       this.sISOCode = "";
       this.sDHLCode = "";
       this.iErrorID = "";
      </cfscript>
      <cfreturn true>
    </cffunction>
    <!---
    // The following functions deal with the load, save and deleting of objects
    --->
    <!---
    // Load
    --->
    <cffunction name="load" displayname="Load items details" returntype="numeric" output="false" hint="This loads in all the information about an item.">
      <cfset rc = this.clear()>
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Check to see if it exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: checkID: '#this.idCountryID#' #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         if(isDefined("session.afr")){
          whichOne = "#session.afr.getsAFRNumber()#";
         } else {
          whichOne = "";
         iErrorID = objError.addError("A Country with that id doesn't exists.[#this.idCountryID#][#whichOne#]");
        </cfscript>
       <cfset this.iErrorID = iErrorID>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // If we got past all then then load in the details
      --->
      <cftry>
       <cfquery name="get" datasource="#sDatasource#">
        SELECT idCountryID, RTRIM(sCountryName) as sCountryName, RTRIM(sISOCode) as sISOCode, RTRIM(sDHLCode) as sDHLCode
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: get: #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfset this.idCountryID = get.idCountryID>
      <cfset this.sCountryName = get.sCountryName>
      <cfset this.sISOCode = get.sISOCode>
      <cfset this.sDHLCode = get.sDHLCode>
      <cfset this.iErrorID = "">
      <cfreturn true>
    </cffunction>
    <!---
    // Save
    --->
    <cffunction name="save" displayname="Save items Details" returntype="numeric" output="false" hint="Saves (to some source) the current details for the ID of the item.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("save: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <!---
      // If it doesn't exist, then add the record, otherwise update the record
      --->
      <cfif not checkID.recordCount>
       <cfreturn this.add()>
      <cfelse>
       <cfreturn this.update()>
      </cfif>
    </cffunction>
    <!---
    // Add
    --->
    <cffunction name="add" displayname="Add Country" returntype="numeric" output="false" hint="This adds a Country.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#'
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that name or ISO code already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <cftry>
       <cfquery name="add" datasource="#sDatasource#">
        SET nocount on
        INSERT INTO tblCountry(sCountryName, sISOCode, sDHLCode)
        VALUES('#this.objFunctions.scrubText(this.sCountryName)#','#this.objFunctions.scrubText(t his.sISOCode)#','#this.objFunctions.scrubText(this.sDHLCode)#')
        SELECT @@identity as autoID
        SET nocount off  
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: add: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn add.autoID>
    </cffunction>
    <!---
    // Update
    --->
    <cffunction name="update" displayname="Update Country" returntype="numeric" output="false" hint="This updates a Country record.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE (sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#')
        AND idCountryID <> #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("Another Country with that name already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Attempt to update the record to the datasource
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="update" datasource="#sDatasource#">
        UPDATE tblCountry
        SET sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#',
        sISOCode = '#this.objFunctions.scrubText(this.sISOCode)#',
        sDHLCode = '#this.objFunctions.scrubText(this.sDHLCode)#'
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: update: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID> 
    </cffunction>
    <!---
    // Delete
    --->
    <cffunction name="delete" displayname="Delete Country" returntype="numeric" output="false" hint="This deletes a Country record.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that id doesn't exists, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now check to see if there are any dependancies, if so we can't delete the item
      --->
      <cftry>
       <cfquery name="checkDependancies" datasource="#sDatasource#">
        SELECT idCountry
        FROM tblAddress
        WHERE idCountry = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkDependancies: idCountry: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkDependancies.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("That Country is being used by an address, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now attempt to remove the record.
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="delete" datasource="#sDatasource#">
        DELETE FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: delete: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID>
    </cffunction>
    </cfcomponent>

  • Dashboard Prompt using values not from the table

    Hi,
    I have a requirement from the client to design a dashboard report like the following.
    Dashboard prompt will have 4 filters, three filters come from the table, but the fourth filter will have 3 values not from the table. The fourth filter will have values like "Report with Sales Amount", "Report with Purchase Amount", "Report with both Purchase and Sales". I have three different Table reports designed for each of the fourth filter choices. But how do I implement it, both in the dashboard prompt as well as navigating to the rite report based on the selection.
    Is my approach correct.
    Thanks for your time and help.

    The fourth prompt where you have "Report with Sales Amount", "Report with Purchase Amount", "Report with both Purchase and Sales" you pull a dummy column into the prompt and write a sql in show.
    would be something like
    SELECT Case when 1=0 then "Dimension- Customer"."Cust Name" else 'Report with Sales Amount' end FROM Sales UNION SELECT Case when 1=0 then "Dimension- Customer"."Cust Name" else 'Report with Purchase Amount' end FROM Sales
    and in the prompt set a presentation variable say var_criteria
    Now create report2 for with a some randomn column and another column will have the values that you want to display for example 'Report with Sales Amount'
    Create a filter on the 2nd column and reference the presentation variable var_criteria and default it to 'Report with Sales Amount'
    On the dashboard page in the section place the report and enable guided navigatoin by selecting report 2.
    Please let me know if you have any questions.
    thanks,
    deep

  • More than 1 line items in bdc using table controls for BOM

    Hi....
    how do u update more than one line item for BOM using BDC table control.......
    is there any specific command for doing that.......
    hav tried d following code bt it takes the flatfile i/p FOR 2 LINE ITEMS as 2 different BOM'S.....
    would appreciate ur help....plz provide code.............
    REPORT zbdc4_cs01
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    INCLUDE bdcrecx1.
    DATA : a TYPE i,
           b type i,
           c type i.
    DATA : BEGIN OF it_rec OCCURS 0,
           rec(200) TYPE c,
           END OF it_rec.
    DATA : BEGIN OF ctab OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
           END OF ctab.
    DATA : BEGIN OF xtab OCCURS 0,
           idnrk(18),
           menge(13),
           postp(1),
           END OF xtab.
    DATA : BEGIN OF itab OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
           idnrk(18),
           menge(13),
           postp(1),
           END OF itab.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = 'C:/TEST4.TXT'
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_rec.
      LOOP AT  it_rec.
        a = strlen( it_rec-rec ).
        if a = 55.
        itab-matnr = it_rec-rec+0(18).
        itab-werks = it_rec-rec+18(4).
        itab-stlan = it_rec-rec+22(1).
        itab-idnrk = it_rec-rec+23(18).
        itab-menge = it_rec-rec+41(13).
        itab-postp = it_rec-rec+54(1).
        APPEND itab.
        elseif a > 55.
        itab-matnr = it_rec-rec+0(18).
        itab-werks = it_rec-rec+18(4).
        itab-stlan = it_rec-rec+22(1).
        itab-idnrk = it_rec-rec+23(18).
        itab-menge = it_rec-rec+41(13).
        itab-postp = it_rec-rec+54(1).
        APPEND itab.
        itab-idnrk = it_rec-rec+55(18).
        itab-menge = it_rec-rec+73(13).
        itab-postp = it_rec-rec+86(1).
        APPEND itab.
        endif.
      ENDLOOP.
      PERFORM open_group.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29N-STLAN'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29N-MATNR'
                                       itab-matnr.           "'3000000107'.
        PERFORM bdc_field       USING 'RC29N-WERKS'
                                       itab-werks.              "'UN02'.
        PERFORM bdc_field       USING 'RC29N-STLAN'
                                       itab-stlan.              "'1'.
        PERFORM bdc_field       USING 'RC29N-STLAL'
        PERFORM bdc_field       USING 'RC29N-DATUV'
                                      '11.08.2008'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0110'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29K-BMENG'
                                      '1'.
        PERFORM bdc_field       USING 'RC29K-STLST'
                                      '1'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29K-EXSTL'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0111'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29K-LABOR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSTP(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29P-IDNRK(01)'
                                       itab-idnrk.             "'1000000232'.
        PERFORM bdc_field       USING 'RC29P-MENGE(01)'
                                       itab-menge.              "'100'.
        PERFORM bdc_field       USING 'RC29P-POSTP(01)'
                                       itab-postp.             "'L'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR'.
        PERFORM bdc_field       USING 'RC29P-POSNR'
                                      '0010'.
        PERFORM bdc_field       USING 'RC29P-IDNRK'
                                      '1000000232'.
        PERFORM bdc_field       USING 'RC29P-MENGE'
                                      '100'.
        PERFORM bdc_field       USING 'RC29P-MEINS'
                                      'KG'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POTX1'.
        PERFORM bdc_field       USING 'RC29P-SANKA'
                                      'X'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=FCBU'.
        PERFORM bdc_transaction USING 'CS01'.
      ENDLOOP.
      PERFORM close_group.

    Hi
    Check this sample code for the Table Control in BDC:
    data: fnam(20) type c.
    move 1 to id.
        loop at TI_STAGING WHERE VENDOR = IT_STAGING-VENDOR AND DOCDATE = IT_STAGING-DOCDATE.
          concatenate 'RM06E-EPSTP(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-itmcategory.
          concatenate 'EKPO-KNTTP(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-accassignment.
          concatenate 'EKPO-EMATN(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-material.
          concatenate 'EKPO-TXZ01(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-shortxt.
          quan = ti_staging-poqty.
          concatenate 'EKPO-MENGE(0' id ')' into fnam.
          perform bdc_field       using fnam quan.
          concatenate 'RM06E-EEIND(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-deliverydate.
          netpr = ti_staging-netpr.
          concatenate 'EKPO-NETPR(0' id ')' into fnam.
          perform bdc_field       using fnam netpr.
          concatenate 'EKPO-MATKL(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-mategroup.
          concatenate 'EKPO-WERKS(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-plant.
          ID = ID + 1.
        ENDLOOP.
    Regards,
    Vishwa.

  • Getting values from the table control to the program

    Hi Gurus,
    i created a program for sales order creation to transfer order creation and to insert multiple values i defined my own selection screen by inserting table control before that the code executed succesfully but after inserting the table control it is not creating any documents
    code before inserting table control:-
    REPORT  zcl120_sales_n_delivery.
                      SALES DOCUMENT CREATION
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
    PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
    PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
    *ITEM
    PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
    PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.
    DATA DECLARATIONS.
    DATA: v_vbeln LIKE vbak-vbeln.
    DATA: header LIKE bapisdhead1.
    DATA: headerx LIKE bapisdhead1x.
    DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
    DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
    DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
    WITH HEADER LINE.
    DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
    WITH HEADER LINE.
    HEADER DATA
    header-doc_type = p_auart.
    headerx-doc_type = 'X'.
    header-sales_org = p_vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = p_vtweg.
    headerx-distr_chan = 'X'.
    header-division = p_spart.
    headerx-division = 'X'.
    headerx-updateflag = 'I'.
    partner-partn_role = 'AG'.
    partner-partn_numb = p_sold.
    APPEND partner.
    partner-partn_role = 'WE'.
    partner-partn_numb = p_ship.
    APPEND partner.
    item-material = p_matnr.
    item-plant = p_plant.
    item-target_qty = p_menge.
    item-target_qu = 'ST'.
    item-item_categ = p_itcat.
    APPEND item.
    itemx-updateflag = 'I'.
    itemx-material = 'X'.
    itemx-plant = 'X'.
    itemx-target_qty = 'X'.
    itemx-target_qu = 'X'.
    itemx-item_categ = 'X'.
    APPEND itemx.
    Fill schedule lines
    lt_schedules_in-itm_number = '000010'.
    lt_schedules_in-sched_line = '0001'.
    lt_schedules_in-req_qty = p_menge.
    APPEND lt_schedules_in.
    Fill schedule line flags
    lt_schedules_inx-itm_number = '000010'.
    lt_schedules_inx-sched_line = '0001'.
    lt_schedules_inx-updateflag = 'X'.
    lt_schedules_inx-req_qty = 'X'.
    APPEND lt_schedules_inx.
    Call the BAPI
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
      EXPORTING
        sales_header_in     = header
        sales_header_inx    = headerx
      IMPORTING
        salesdocument_ex    = v_vbeln
      TABLES
        return              = return
        sales_items_in      = item
        sales_items_inx     = itemx
        sales_schedules_in  = lt_schedules_in
        sales_schedules_inx = lt_schedules_inx
        sales_partners      = partner.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      WRITE / return-message.
      WRITE: / 'Error in creating document'.
    ELSE.
      COMMIT WORK AND WAIT.
      WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
                      DELIVERY ORDER CREATION
    *PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
            kwmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-kwmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
      TABLES
        request      = t_request
        createditems = t_created
        return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    WRITE: /  'Delivery Number : ',
             t_created-document_numb.
                      CREATE TRANSFER ORDER
    DATA: w_tanum TYPE ltak-tanum.
    CALL FUNCTION 'L_TO_CREATE_DN'
      EXPORTING
        i_lgnum                          = '010'
        i_vbeln                          = t_created-document_numb
    IMPORTING
       e_tanum                          = w_tanum
    EXCEPTIONS
       foreign_lock                     = 1
       dn_completed                     = 2
       partial_delivery_forbidden       = 3
       xfeld_wrong                      = 4
       ldest_wrong                      = 5
       drukz_wrong                      = 6
       dn_wrong                         = 7
       squit_forbidden                  = 8
       no_to_created                    = 9
       teilk_wrong                      = 10
       update_without_commit            = 11
       no_authority                     = 12
       no_picking_allowed               = 13
       dn_hu_not_choosable              = 14
       input_error                      = 15
       OTHERS                           = 16
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK AND WAIT.
    WRITE: / 'Transfer order number',
           w_tanum.
    Code after inserting table control:-
    REPORT  zcl120_sales_n_delivery.
                      SALES DOCUMENT CREATION
    DATA: p_auart TYPE auart .
    DATA: p_vkorg TYPE vkorg .
    DATA: p_vtweg TYPE vtweg .
    DATA: p_spart TYPE vtweg .
    DATA: p_sold TYPE kunnr .
    DATA: p_ship TYPE kunnr .
    *ITEM
    data:
    begin of it_item occurs 0,
       p_matnr TYPE matnr,
       p_menge TYPE kwmeng,
       p_plant TYPE werks_d,
       p_itcat TYPE pstyv,
    end of it_item.
    DATA DECLARATIONS.
    DATA: v_vbeln LIKE vbak-vbeln.
    DATA: header LIKE bapisdhead1.
    DATA: headerx LIKE bapisdhead1x.
    DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
    DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
    DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
    WITH HEADER LINE.
    DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
    WITH HEADER LINE.
    DATA:
      W_COUNTER TYPE I,
      IT_NUM(6) TYPE C value '000010',
      IT_LINE(4) TYPE C value '0001'.
      CALL SCREEN 100.
    HEADER DATA
    header-doc_type = p_auart.
    headerx-doc_type = 'X'.
    header-sales_org = p_vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = p_vtweg.
    headerx-distr_chan = 'X'.
    header-division = p_spart.
    headerx-division = 'X'.
    headerx-updateflag = 'I'.
    partner-partn_role = 'AG'.
    partner-partn_numb = p_sold.
    APPEND partner.
    partner-partn_role = 'WE'.
    partner-partn_numb = p_ship.
    APPEND partner.
    loop at it_item.
    CLEAR ITEM.
    item-material = it_item-p_matnr.
    item-plant = it_item-p_plant.
    item-target_qty = it_item-p_menge.
    item-target_qu = 'ST'.
    item-item_categ = it_item-p_itcat.
    APPEND item.
    W_COUNTER = W_COUNTER + 1.
    endloop.
    DO W_COUNTER TIMES.
    itemx-updateflag = 'I'.
    itemx-material = 'X'.
    itemx-plant = 'X'.
    itemx-target_qty = 'X'.
    itemx-target_qu = 'X'.
    itemx-item_categ = 'X'.
    APPEND itemx.
    ENDDO.
    Fill schedule lines
    LOOP AT IT_ITEM.
    CLEAR lt_schedules_in.
    lt_schedules_in-itm_number = IT_NUM.
    lt_schedules_in-sched_line = IT_LINE.
    lt_schedules_in-req_qty = IT_ITEM-p_menge.
    APPEND lt_schedules_in.
    IT_NUM = IT_NUM + 10.
    IT_LINE = IT_LINE + 1.
    ENDLOOP.
    IT_NUM = '000010'.
    IT_LINE = '0001'.
    Fill schedule line flags
    LOOP AT IT_ITEM.
    CLEAR lt_schedules_inx.
    lt_schedules_inx-itm_number = IT_NUM.
    lt_schedules_inx-sched_line = IT_LINE.
    lt_schedules_inx-updateflag = 'X'.
    lt_schedules_inx-req_qty = 'X'.
    APPEND lt_schedules_inx.
    IT_NUM = IT_NUM + 10.
    IT_LINE = IT_LINE + 1.
    ENDLOOP.
    Call the BAPI
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
      EXPORTING
        sales_header_in     = header
        sales_header_inx    = headerx
      IMPORTING
        salesdocument_ex    = v_vbeln
      TABLES
        return              = return
        sales_items_in      = item
        sales_items_inx     = itemx
        sales_schedules_in  = lt_schedules_in
        sales_schedules_inx = lt_schedules_inx
        sales_partners      = partner.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      WRITE / return-message.
      WRITE: / 'Error in creating document'.
    ELSE.
      COMMIT WORK AND WAIT.
      WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
                      DELIVERY ORDER CREATION
    *PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
            kwmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-kwmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
      TABLES
        request      = t_request
        createditems = t_created
        return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    WRITE: /  'Delivery Number : ',
             t_created-document_numb.
                      CREATE TRANSFER ORDER
    DATA: w_tanum TYPE ltak-tanum.
    CALL FUNCTION 'L_TO_CREATE_DN'
      EXPORTING
        i_lgnum                          = '010'
        i_vbeln                          = t_created-document_numb
    IMPORTING
       e_tanum                          = w_tanum
    EXCEPTIONS
       foreign_lock                     = 1
       dn_completed                     = 2
       partial_delivery_forbidden       = 3
       xfeld_wrong                      = 4
       ldest_wrong                      = 5
       drukz_wrong                      = 6
       dn_wrong                         = 7
       squit_forbidden                  = 8
       no_to_created                    = 9
       teilk_wrong                      = 10
       update_without_commit            = 11
       no_authority                     = 12
       no_picking_allowed               = 13
       dn_hu_not_choosable              = 14
       input_error                      = 15
       OTHERS                           = 16
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK AND WAIT.
    WRITE: / 'Transfer order number',
           w_tanum.
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'TAB_CON1' ITSELF
    CONTROLS: TAB_CON1 TYPE TABLEVIEW USING SCREEN 0100.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TAB_CON1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
    MODULE TAB_CON1_CHANGE_TC_ATTR OUTPUT.
      DESCRIBE TABLE IT_ITEM LINES TAB_CON1-lines.
    ENDMODULE.
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
       SET PF-STATUS 'MENU'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module USER_COMMAND_0100 input.
    IF SY-UCOMM EQ 'START'.
    LEAVE to screen 0 .
    ENDIF.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  APPEND_IT_ITEM  INPUT
          text
    module APPEND_IT_ITEM input.
    APPEND IT_ITEM.
    CLEAR IT_ITEM.
    endmodule.                 " APPEND_IT_ITEM  INPUT
    plz help me where the error is

    Hi,
    Do same as suggested by Ramesh. Add one user command button after clicking that do the looping and call new screen.
    Ashven.

  • How can we delete value fields from the Table T237A?

    Dear All,
    We need to delete some value fields in CO-PA. We got a message that these value fileds are being used in the Table T237A.
    This table is related to key figure scheme.
    We have deleted in t.c. sm31 in the table/view  V_RS_T237A elements which were assigned to value fields to be deleted.
    But we still have a message value fields are being used. And after some searches we found out they are still being used in the table T237A.
    COuld you please, help us?
    Thank you in advance!
    Best regards,
    Kamila.

    Change the Table Control attributes such that user can only select a single record(row).
    <u>Tip to delete a selected record</u>
    1) write a module 'Mark' in the PAI as below
    PROCESS AFTER INPUT.
    MODULE cancel AT EXIT-COMMAND.
    LOOP WITH CONTROL table_view.
    MODULE read_table_control.
    FIELD flag MODULE mark ON INPUT.
    ENDLOOP.
    MODULE user_command_0100.
    2) Module Mark is below.
    MODULE mark INPUT.
    CHECK flag = 'X'.
    x = table_view-top_line + sy-stepl - 1.
    Delete itab INDEX x.
    ENDMODULE. " mark INPUT
    Table_view is the TableControl Name.
    'flag' is of type char(1) available in the Internal table which was assigned to the select option in the table control.
    <u>award if uesful</u>
    Regards,
    Sudheer

  • How to Import Excel 2007 worksheet that has more than 255 columns into SQL Server 2008 table using SSIS 2008.

    I am using Excel source which uses Microsoft ACE 12.0 OLE DB provider, this only allows the first 255 columns to be imported and not the rest.
    I need to export all the columns into the table .
    Any pointers to this is greatly appreciated

    If you can use third-party solutions, check the commercial COZYROC Excel adapters:
    Excel Connection Plus Manager
    Excel Source Plus
    Excel Destination Plus
    Excel Task
    The enhanced components can be used both under 32bit and 64bit modes and doesn't exhibit the 255 columns limitation.
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Can I update more than one iPad and iPhone from the same MacBook pro?

    Can I update more than one iPad and iPhone to ios 5 from the same MacBook pro? Our family has one MacBook pro and several iphones and ipads.  No one wants to lose their iTunes music or contact list or calendars.

    Yes, but you will want to think it through before you do it.
    The computer will become the "master" device, holding the definitive collection of music, photos, contacts, etc., and each iPad or iPhone will get a copy of what's on the computer. So if  everyone has different collections of music or photos that you all want to keep separate from each other, you'll want to set up different accounts on the MacBook Pro. To do that, go into "System Preferences" and click "Users", then click the "+" to create a new account for each person who needs their own set of files.
    That way you can each log in to your own MacBook account before you sync your iPhone or iPad, and everyone has their own copy of iTunes and their own iPhoto. If you happen to plug in an iPhone while logged into someone else's account, you just click "don't sync" (the 1st time only, it will remember after that). Sharing the same files becomes tricky, so this is only the best method if you want to keep things 100% separate.
    On the other hand, if you all have your music and photos mishmashed together on the MacBook anyway or just don't care about keeping things separate, just go ahead and sync your iPhones and iPads without setting up new accounts. But in this case, you should create playlists and photo albums in iTunes and iPhoto. Then plug in an iPhone, click on it's icon in iTunes, and change the settings for Music, Photos, etc to only sync the playlists that you want on that device. Repeat for each one. They'll all remember their own settings, and continue to sync with their designated playlists or albums.
    What you cannot do is use more than one computer with a single iPhone. That will wipe out the music and photos that were on it already, replacing them with the ones on the second computer.

  • Isd there a way to have mail use more than one address per person from the address book?

    Have a group in address book and some of the records have more than one email address. Is there a way to have mail use both addresses or do I need to have an individual record for each email I want to send to?

    This article seems to describe a way to do what you want.

  • Why is the print area on all envelope templates more than 1/2 an inch from the left side of the envelope.. ? Can this be fixed or changed.. ?

    Why is the print area on all envelope templates more than 1/2 inch from the left side of the envelope.. ? Can this be fixed or changed.. ?
    I have pages 09 version 4.1... It is a small aggravation.. The left 3 or 4 characters on the return address would not print until I realized that by clicking on
    " View " & " Show Lay-Out " that it was out side the printable range ...

    It seems to be a Pages template  " Print range " issue..  Both the Epson and the HP printers were doing it and it was today that I realized why..  !!
    When I move it to where it will print there is large gap on the left margin of the return address..  Just wondering if anyone else knew about this.. ? My Pages is ' 09 ' version 4.1...

  • How can I print more than one slide per page from the iPad????

    Im having problems printing from the iPad. I want to print more than one slide in one peace of paper. 3, 6, 9 ...
    Can any one help?

    Start the print process and click on the Custom layout.  At the bottom you can set the size of the image desired and see how many photos can be placed on the page size selected.
    OT

  • Can we email more than one photo at once from the iPad?

    It is easy to email a photo from the iPad, one photo at a time, but is it possible to send multiple photos attached to one email from the iPad?

    Sure, it's possible to select more than one photo in the Photos app, then press the email icon. There is a limit which is, iirc, five.
    Yes, five .... as soon as you select the sixth the email icon greys out. Just tap the photos you want to send to select them.

  • Jsp session problem when more than one user is loging from the same machine

    Hi everybody,
    I have created a login page and i use to store user name and password using sessions. It is working fine for one user from one machine. But if two or more users logged from the same machine, all the users are getting the same data as of the last user logged in. Also if one user is logged out all user sessions on that machine are expiring (same as previous YAHOO problem).
    i think there is problem with session variables. The user name and password which i am storing in session variables are updating the same variables for all users. I think a seperate set of session variables are not creating for each user login.
    Can any body help me plz....
    regards,
    Prasanth.C

    First, you need to clear any cookies you are setting.
    Second, you need to synchronize some key data fetching blocks in your servlet.
    Third, ensure that you are invalidating a session properly.
    Don't ask me for more details. Google around for information ;)
    Richard.

  • How do I return from the log out screen?

    I am testing an installation of a forum module in a Muse site. The module works but when I log out I get stuck at the log out screen. I have tried to use use hyperlinks manager to choose a browser window with no success. I am hoping that users will be able to easily return to the Muse site.

    Hi Neil,
    This can be customisd from the system pages area, in your Business Catalyst Admin: http://prntscr.com/305v17. You can add whatever customization you want, such as a redirect, or a link to another page.
    Kind Regards,
    Alex

  • Need more than 255 character to show data in print program

    Hi All,
      I am using read_text FM. We have 8 lines in itab almost 2000 character.
    Now I want to show it in my smartforms. I used concatenate lines of itab into result separated by space.
    But here I am getting only 255 character in our result. Can any body help me out to resolve this problem.
    Thanks,
    Rakesh

    Hi,
    No need to use the FM Read_text. use include text instead of text element and pass the required field value combination, then SAP will automatically display it.
    Pass the details to
    Text Name
    Text Object
    Text ID
    Language
    Regards
    Shiva

Maybe you are looking for

  • I get a blank white screen when I try to play games on Club Pogo

    as stated earlier, when I go to club pogo, all I get is a blank white screen, firefox will go to site but will not load the games,

  • Applet Security Issue in Vista?

    I'm having a strange problem where I'm getting a permission violation while trying to read a file in an applet. This file is on the server-side and should therefore not be subject to any read/write restrictions. Strangely enough, I think at one point

  • Is this bad usage of the applet sound player

    I have this class for playing audio for my application. currently it is a game the is presented in a JFrame but when trying to play audio i kept coming across the use of java.applet.AudioClip for playing audio. what i want to know is what i am doing

  • I Can't update to the 30.2012.07-1

    I got a prompt to update my N9 to version  30.2012.07-1 In the first step it downloads some files. After this finished fine it propted to "continue" with the installation. The installation screen remains at "Updating 0%" for several minutes and then

  • Help Need Help for Creative M

    my Creative Muvo and Creative Muvofm will not read in my coputer. when i it put in the a USB port nothing will pop up. then when i go to My Computer it will not be there. then when i am at the My Coputer i right click and go to Hardware and then Devi