Error on creating Purchase order document using DI API

Dear all,
I am getting an error "<b>Server threw an exception</b>"  at the time of initializing object of Purchse order document. code is
vDrafts = GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)
I am using SBO 2005B SP 0 PL-20.
Reply as soon as possible.
Regards,
Manish Jha

Hi Manish,
I am not sure if I am right, but I remember something about a bug in SBO SDK that gave an error when trying create draft object. Not sure on which patch this was though and am not sure if this is your problem too. Maybe someone else can remember what patch it was on?
Hope it helps,
Adele

Similar Messages

  • I need output type NEU automaticaly for create purchase order document type

    Dear Experts,
    I need output type NEU automaticaly for create purchase order document type NB
    when transaction code MN04, I am doing the following:
    (1) I selected the third option Purchasing Output determination: Document type
    (2) I selected the output type NEU.
    (3) In condition records in document type , i have chosen NB.
    (4) In name its automatically coming as Purchase requisition
    Please suggest how Purchase Order NB will come

    Hi,
    Check & press F4, NB Purchase Order (for catagory F) will be there after entering PO output type NEU & then maintaion the condition record in MN04.
    Output type NEU automaticaly defaulted during purchase order creation with document type ,then just fine tune the output (message) type in following path:
    SPRO--->MM->Purchasing>Message>Output control->Message types> Define message type for Purchase Order----->Fine-Tuned Control: Purchase Order
    Now here select the check box corresponding to your output(message) type NEU to have print output automatically displayed & save.
    Now try to creating Purchase Order & you will have default message type NEU.
    Regards,
    Biju K

  • Error while creating purchase order with account assignment category "A"

    Dear All,
                      At the time of creating purchase order with account assignment category A - Asset its throwing error as " GL Account 123400 can not be used"
    how to resolve this  issue"
    Edited by: Matt on Sep 16, 2010 10:09 AM - removed bold tags

    HI,
    Assign all assets GL to Asset Class
    spro --> financial accounting new -->assets accounting --> assets accounting (lean Implementation) --> organization structures --> Assign GL
    Hope Help U !
    Regards,
    Pardeep Malik

  • Restrict "Create Purchase Order" Authorization using vendor number "LIFNR"

    Hello All,
    How can we restrict the creation of purchase order(ME21N) using the vendor number (LIFNR).
    Any helpful idea?
    Regards,

    Hey Sanjay,
    i am facing same problem of uploading multiple line item through LSMW .
    and u did good exploration on  same can u give me some idea,
    how i do modification in LSMW program?
    do u mean i need to do some coding before step CONVERT DATA.
    and can u give some guidline to do it..
    u r hint will be sufficient..
    Thx in Advance..
    Rajesh

  • Problem in creating purchase order document

    Hi,
    I created a new business document : Purchase request that once it is validated we can copy it to Puchase order.
    when i save the purchase order doc and then launch the creation of the purchase order the operation succed.
    But when i try to copy an already created purchase request i get the error :
    Object reference not set to an instance of an object
    Does any have a clue?
    Thanks a lot.

    This is my code
    Form = _SboApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);
                                                            Documents _Documents =
                                                                (Documents)
                                                            _SboCompany.GetBusinessObject(BoObjectTypes.oPurchaseOrders);
                                                            // Add PO Header
                                                            _Documents.CardCode =
                                                                ((EditText) _Form.Items.Item("3").Specific).Value.ToString();
                                                            _Documents.CardName =
                                                                ((EditText)_Form.Items.Item("4").Specific).Value.ToString();
                                                            // Add PO Lines
                                                            Matrix matrix = (Matrix)Form.Items.Item("37").Specific;
                                                            if (_matrix.RowCount > 0)
                                                                _Documents.Lines.ItemCode =
                                                                    ((EditText)
                                                                     _matrix.Columns.Item("35").Cells.Item(1).Specific).
                                                                        Value;
                                                                string value =
                                                                    ((EditText)
                                                                     _matrix.Columns.Item("38").Cells.Item(1).Specific).
                                                                        Value.Replace(".", ",");
                                                                double val = Convert.ToDouble(value);
                                                                _Documents.Lines.Quantity =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("38").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.Price =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("39").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.DiscountPercent =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("40").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.VatGroup =
                                                                    ((ComboBox)
                                                                     _matrix.Columns.Item("41").Cells.Item(1).Specific).
                                                                        Selected.Value;
                                                                _Documents.Lines.Price =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("39").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.DiscountPercent =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("40").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                                    _Documents.Lines.VatGroup =
                                                                    ((ComboBox)
                                                                     _matrix.Columns.Item("41").Cells.Item(1).Specific).
                                                                        Selected.Value;
                                                                                    for (int i = 2; i < _matrix.RowCount + 1; i++)
                                                                    _Documents.Lines.Add();
                                                                    _Documents.Lines.ItemCode =
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("35").Cells.Item(i).
                                                                             Specific).
                                                                            Value;
                                                                    _Documents.Lines.Quantity =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("38").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    _Documents.Lines.Price =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("39").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    _Documents.Lines.DiscountPercent =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("40").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    string val1 = ((ComboBox)
                                                                                    _matrix.Columns.Item("41").Cells.Item
                                                                                    i).Specific).
                                                                        Selected.Value;
                                                                    _Documents.Lines.VatGroup =
                                                                        ((ComboBox)
                                                                         _matrix.Columns.Item("41").Cells.Item(i).
                                                                             Specific).
                                                                            Selected.Value;
                                                                int err = _Documents.Add();
                                                                GC.Collect();
    thanks for your attention

  • Error when create purchase order

    Hi all,
    I have a strange error when create po. it is display : Please enter item number greater than 0.that only a vendor and a material.I check the vendor and the material is same as other vendor and materials.if i first input the vendor and input the material then display message : Please enter item number greater than 0,but i can't input the item number. if i first input material and enter,then input vendor the system is ok. I check configer is ok. and other vendor , material also ok.
    thanks to reply.
    james

    Hi,
    Go to SPRO-Materials Management-Purchasing-Purchase Order-Define Document Types..
    Select your doc type which you are selcting at the time of PO creation..
    Say for e.g. NB.
    Now you have to maintain " Item Number Interval" as 10 in front of your doc type.
    This option is just after "Document Type Description".
    Now save and check.
    Cheers...
    Utsav..

  • Error in Creating Purchase Order (ME21N)

    Dear Experts,
    A pleasant day to all of you!
    I would like to ask help because when I try to save Purchase Order, error messages "There is an error in the specifications for area 04 in co. code XXXX".
    Message no. AC391
    Diagnosis
    You specified for depreciation area 04 that asset values are to be automatically posted online, and that this area is to take over book values from another area. This specification is not correct. An area that allows for online automatic posting cannot take over values from another area.
    Procedure
    Correct the specifications for area 04.
    We really need to resolve this issue as soon as possible as it blocking activities on three company codes.
    It would be a great for me if you could help undertand the cause of the error.
    Points will be rewarded. Thank you!
    Best Regards,
    Jhay-R

    Hello,
    This problem is more of a customizing problem but you could try the                       
    following:                                                                               
    The message AC359 states in its help text, that you are using currency                    
    types, which indicates the usage of parallel currency. This is only                       
    possible by transferring a given value from area 01 into the other area.                  
    It is not possible to change the value by another valuation.                                                                               
    As your Company Code manages parallel currencies in Asset Accounting,                     
    you must define exactly one dependent area for each area that is                          
    supposed to post automatically online to reconciliation accounts.                         
    You have to define this area to take over identical values and                            
    parameters, and use the currency type xxx, and currency xxx.                              
    The xxx denotes your parameters. In addition please look at your                          
    Company Code in FI Customizing(TA OB22). In Asset Management                              
    you have to define a depreciation area for every Parallel currency you                    
    use in FI. This depreciation area(s) must be defined as areas for                         
    Parallel curriencies(Asset Balance Online as Parallel currency)                           
    The currency of this depreciation area must be the same as the                            
    Parallel currency in the FI.                                                              
    Also check whether the IMG follow menu path is activated:                                 
    Financial Accounting->Asset Accounting->Valuation->Depreciation Areas->                   
    Definition>.  Under the Takeover Rules->Takeover From:  W/out ability to                  
    change the box under "Depreciation Rules" is activated.                                   
    Hope this will help you.
    Regards
    Claudia

  • Error when creating purchase order

    Hello all,
    when we create a purchase order in SAP and hit the SAVE button to create it, an error screen comes up and says:
    Syntax error in program "SAPLECP_PDF"
    What happened?
    The following syntax error occurred in the program SAPLECP_PDF:
    "The TYPE-POOL "ALVT" is unknown"
    Error in ABAP applicatio program.
    The current ABAP program "SAPLXM06" had to be terminated because one of the statements could not be excuted.
    What can I do to fix that?
    Thanks
    Anne

    SAPLECP_PDF is pretty small (open it in SE38)
    3 statements are includes for user-defined files....
    Of course it interacts with the form and customizing settings and may retrieve faulty entries from there that cause finally a syntax error. But I have not seen any SAP program that got shipped with a syntax error.
    sorry had overlooked this hint TYPE-POOL "ALVT" .
    Now i guess that the transport from your developement system to system  you get teh error was not complete.
    Edited by: Jürgen L. on Feb 15, 2008 8:05 PM

  • Error in creating Purchase Order

    Dear Experts,
    A pleasant day to all of you!
    I would like to ask help because when I try to save Purchase Order, error messages "There is an error in the specifications for area 04 in co. code XXXX".
    We really need to resolve this issue as soon as possible as it blocking activities on three company codes.
    It would be a great for me if you could help undertand the cause of the error.
    Points will be rewarded. Thank you!
    Best Regards,
    Jhay-R

    Dear Raghu,
    Thanks for your help.
    Please find the below detailed error:
    "There is an error in the specifications for area 04 in co. code RO10"
    Message no. AC391
    Diagnosis
         You specified for depreciation area 04 that asset values are to be automatically posted online, and that this area is to take over book values from another area. This specification is not correct. An area that allows for online automatic posting cannot take over values from another area.
    Procedure
       Correct the specifications for area 04.
    I have searched an OSS message for this and found note 14990 but unfortunately SAP advised me that the said note is related to our release.
    Best Regards,
    Jhay-R

  • Error in creating purchase order/ requisition/ quotation..

    Hi techies,
    I amunable to create a po and getting an error message as below. I tried ob08, ob07, obbs commands but of no use... can anyone please guide me....thanks in advance
    Ambiguous EUR/INR exchange rate relations
    Message no. SG028
    Diagnosis
    The change to a different exchange rate type revealed different exchange rate relationships.
    System Response
    Fehlermeldung
    Procedure
    Maintain the exchange rate relationships for currency pair EUR / INR for all exchange rate types so that the conversion factors are the same.
    Execute Function
    You can then continue.

    HI,
    check in T-code OBBS currency type "M" the exchange relation EUR/INR and the column at the right side "Alt. ERT" (means alternative exchange rate).
    View also this currency type exchange relation EUR/INR there, I guess this is different from the one entered in "M" for the date the currency conversion happens in the PO.
    BR Christian

  • Error while creating Purchase order

    Hi Experts,
    No posting rules exist for account key
    Message no. FF714
    Diagnosis
    No posting rules have been defined for the account key in the tax table in table T007B.
    Procedure
    Change the tax table, enter an account key already defined for the transaction in question or define the posting rules for a new account key in table T007B.
    I have maintained all account keys in Tax Procedure.
    Plz let me y this error is coming.

    Hello,
    Goto T.Code OB40.
    Select the account key you have mentioned in your calculation procedure, and give your Chart of accounts.
    Then goto 'Rules' Tab and maintain the fields (against tax code or not) against which you want to maintain G/L accounts for tax processing.Save the entries and try the transaction again.
    Regards
    Gregory Mathews

  • Error when downloading large SharePoint document using REST API

    Hello,
    The following code works fine for small files, but I got "SCRIPT14: Not enough storage is available to complete this operation." error when downloading files over 100M.
    Is it possible to write the data directly to a local storage (IndexedDB for example) instead of keeping it in memory?
            var getFileEndpoint = String.format(
                 "{0}/_api/SP.AppContextSite(@target)/web/getfilebyserverrelativeurl('{1}')/$value?@target='{2}'",
                 _SPAppWebUrl, _DocumentUrl, _SPHostUrl);
            var executor = new SP.RequestExecutor(_SPAppWebUrl);
            var info = {
                url: getFileEndpoint,
                method: "GET",
                //binaryStringResponseBody: true,
                success: function (data) {
                    //Save data to IndexedDB
                error: function (err) {
                    //Error handling
            executor.executeAsync(info);
    Since my page is located in a SharePoint Hosted App, I can't use XMLHttpRequest directly to access the document in the host site. Seems like the MS cross-domain library is the only choice to me.
    Thanks,
    Matt.
    Matt

    Hi,
    Per my understanding, you might want to download the content of files into database in SharePoint Hosted App.
    In SharePoint Hosted App, as we can only use JavaScript which is supposed to be executed in browser, the content retrieved will be stored in memory then to the local hard drive.
    As a workaround, I suggest you develop a Provider Hosted App and do the same job there instead. In Provider Hosted App, we can use C# to handle the file downloading which should
    be more appropriate in your scenario.
    About
    how to download file using SharePoint Client Object Model:
    http://www.lucacostante.com/item/15-download-and-upload-files-via-sharepoint-client-object-model.html
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Problem while creating a custom document using JAVA API in the current Folder

    I am trying to create an instance of a custome type from the API. I have created a custom type via XML. I have associated a JSP with the custom type thru iFS manager. This jsp provides an interface for the user to enter various data. On submit I call some other jsp also loaded into the /ifs/webui/jsps which calls a method in the java class to create an instance of the above mentioned type. This instance needs to be created in the current directory and not in the home directory of the user. I have written a java program which when run from JDeveloper connects to the repository and creates the object, but not as a foldered object. If I load this class into custom_classes directory, I get an exception. I am attaching the code also here which does the actual processing.
    package cms;
    import oracle.ifs.agents.common.*;
    import oracle.ifs.agents.manager.*;
    import oracle.ifs.agents.server.*;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    public class ContentModule extends Object {
    public static final String CLASSNAME = "CONTENT";
    public static final String TOPICID_ATTRIBUTE = "TOPICID";
    public static final String SITEID_ATTRIBUTE = "SITEID";
    LibrarySession m_session;
    public ContentModule() {
    connectToRepository();
    createDocument("AM5","s");
    public void connectToRepository(){
    try{
    LibraryService l_service=new LibraryService();
    CleartextCredential l_credential = new CleartextCredential("system","manager");
    ConnectOptions l_options=new ConnectOptions();
    l_options.setServiceName("IfsDefault");
    l_options.setServicePassword("ifssys");
    m_session=l_service.connect(l_credential,l_options);
    }catch(IfsException ex){
    ex.setVerboseMessage(true);
    ex.printStackTrace();
    public void createDocument(String p_docName,String p_docContent){
    try{
    DocumentDefinition l_doc=new DocumentDefinition(m_session);
    l_doc.setClassname(CLASSNAME);
    long newId1=5;
    long newId2=5;
    FolderPathResolver l_currentPath=new FolderPathResolver(m_session);
    Folder l_currentFolder=l_currentPath.getCurrentDirectory();
    l_doc.setAddToFolderOption(l_currentFolder);
    l_doc.setName(p_docName);
    l_doc.setContent(p_docContent);
    AttributeValue av1 = AttributeValue.newAttributeValue(newId1);
    l_doc.setAttribute(TOPICID_ATTRIBUTE,av1);
    AttributeValue av2 = AttributeValue.newAttributeValue(newId2);
    l_doc.setAttribute(SITEID_ATTRIBUTE,av2);
    Document l_document=(Document) m_session.createPublicObject(l_doc);
    }catch(IfsException ex){
    ex.setVerboseMessage(true);
    ex.printStackTrace();
    public static void main(String[] args) {
    ContentModule contentModule = new ContentModule();
    Any help will be highly appreciated.
    Thanks

    Please print out the Verbose Stack Trace generated when you run this application.
    I suspect that you FolderPathResolver is not pointed at the directory you think it is. You might want to try printing out
    I_CurrentFolder.getAnyFolderPath();
    and I_CurrentFolder.getName();
    null

  • Purchase order layout using Smartform

    Hi All,
    Can anyone let me know how to create Purchase order layout using smartforms and assigning it to output type.
    Is there standard smartform for purchase order?

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    http://www.sap-basis-abap.com/sapsf001.htm
    http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    http://www.esnips.com/doc/13b7ae7a-b32c-4b96-b588-881859d4ac99/Template,Table,Loop,Command-in-Smartforms.doc
    http://www.esnips.com/doc/97acb00a-e513-4611-91f0-c626f460bfc5/Smart_Form_Overview.pdf
    http://www.esnips.com/doc/77a981b9-8fe3-4fbb-8101-67745c1fe60c/SMART-FORMS_shail.ppt
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Try this. A simple sample Smart Form.
    SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
    According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    SMARTFORMS GENERATION: (calling internal table fields)
    &#61656; Open a smartform using the tcode ‘smartforms’.
    &#61656; Usually form attributes shows admn data.
    &#61656; In the form interface declare import/export parameters if any. Else declare the tables in tables tab button.
    &#61656; In the windows and pages expand and create a table. It automatically generates header, main area and footer for the table.
    &#61656; In data tab button in the table we usually declare a work area to bring the data from se38. Like: ktab into wa. ( The purpose of declaring the wa is , to get the data of the ktab in to header from the body area of the internal table).
    &#61656; And in the tablepainter pushbutton in table we can have any no of line types. Depending on the requirement. ( for ex: If we want to devide a row in to 4 columns, we can devide it as 4,4,4,4cm as line type 1, And usually for the footer we don’t need no of columns, So, we declare it as one column with 16cm measure with the name line type 2.). We can use these line types in the tables.
    &#61656; In the header right click>>create>>tableline. It asks for line type. Select one line type which is appropriate.
    &#61656; Like same create a row2 in main area using right click. If we select the line type 1, it automatically generates 4 cells. We can create text in each cell as per requirement.
    &#61656; We can generate general attributes using general attributes tab button in the text. Or in the other way. We can switch on the field list on/off button from the application tool bar. It displays all the attributes in the left down corner of the screen. We can drag and drop the required fields in the general attributes tab button of the text.
    &#61656; We continue the same procedure for all the texts. The texts should be displayed in the gray color. Then only it can collects the data from the abap editor fields.
    &#61656; If it wont turns gray, we can check the fields in the editor by changing it to the line editor. The best thing is to drag the fields from the list, rather than declaring like &wa-matnr&
    &#61656; In the footer also we create a line type and in that table line we create text.
    SE38 PROGRAM(method I):
    REPORT Z_CALLING_SMARTFORM2 .
    tables: mara.
    select-options: S_MATNR for MARA-MATNR.
    DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
    data: FM_NAME TYPE RS38L_FNAM.
    SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in
    S_MATNR.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'Z_MYFIRST_FORM2'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    ktab = ktab
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IN THE OTHER WAY(method II):
    REPORT Z_CALLING_SMARTFORM2 .
    tables: mara.
    select-options: S_MATNR for MARA-MATNR.
    DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
    SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in S_MATNR.
    CALL FUNCTION '/1BCDWB/SF00000199'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    ktab = ktab
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    In the method I we are calling the amartform dynamically using the function module 'SSF_FUNCTION_MODULE_NAME'.
    Here we are exporting form name and importing fm_name.
    So we need to declare the variable fm_name as
    data: FM_NAME TYPE RS38L_FNAM.
    We can have the type of the fm_name in the function module 'SSF_FUNCTION_MODULE_NAME' (in the export tab button).
    Since we are passin the name of the Function module generated by the smart form in to the fm_name variable. We run the function module with the name fm_name, but not the FM generated by the smartform(like /1BCDWB/SF00000199)¬¬¬¬¬¬.
    In the method II we directly call the smartform generated function module (i.e, /1BCDWB/SF00000199).
    But the method I is recommended. In the method I, The fm_name is a variable we don’t put it in the quotes while calling.
    In the both methods we declare the internal table using the like option, but not begin of…. end of. And in select statement we select *, But not individual fields.
    EX2:
    SMART FORM NAME: ZGITI_FORM1.
    SE38:
    REPORT Z_CALL_GIRI_FORM1 .
    TABLES: VBRK.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    *INITIALIZATION.
    *T1 = 'SELECTION-CRIETERIA'.
    DATA: BEGIN OF I_INVOICE OCCURS 1.
    INCLUDE STRUCTURE ZSTR_INVOICE.
    DATA: END OF I_INVOICE.
    DATA: VAR1 LIKE VBRP-NETWR.
    DATA: BEGIN OF I_ADDRESS OCCURS 1.
    INCLUDE STRUCTURE ZSTR_ADDRESS.
    DATA: END OF I_ADDRESS.
    DATA: BEGIN OF I_ORDER OCCURS 1.
    INCLUDE STRUCTURE ZSTR_ORDER.
    DATA: END OF I_ORDER.
    DATA: BEGIN OF I_ITEM OCCURS 1.
    INCLUDE STRUCTURE ZSTR_ITEM.
    DATA: END OF I_ITEM.
    DATA: BEGIN OF I_VBFA OCCURS 1,
    VBELV LIKE VBFA-VBELV,
    VBELN LIKE VBFA-VBELN,
    END OF I_VBFA.
    SELECT KUNAG VBELN VKORG VTWEG SPART FROM VBRK INTO TABLE I_INVOICE
    WHERE VBELN IN S_VBELN.
    IF I_INVOICE[] IS NOT INITIAL.
    SELECT KUNNR LAND1 NAME1 NAME2 ORT01 PSTLZ REGIO FROM
    KNA1 INTO CORRESPONDING FIELDS OF TABLE I_ADDRESS FOR ALL ENTRIES IN
    I_INVOICE WHERE KUNNR = I_INVOICE-KUNAG.
    ENDIF.
    IF I_INVOICE[] IS NOT INITIAL.
    SELECT VBELV VBELN FROM VBFA INTO TABLE I_VBFA FOR ALL ENTRIES IN
    I_INVOICE WHERE VBELN = I_INVOICE-VBELN.
    ENDIF.
    IF I_VBFA[] IS NOT INITIAL.
    SELECT VBELN BSTNK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE I_ORDER
    FOR ALL ENTRIES IN I_VBFA WHERE VBELN = I_VBFA-VBELV.
    ENDIF.
    IF I_INVOICE[] IS NOT INITIAL.
    SELECT POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE I_ITEM FOR ALL
    ENTRIES IN I_INVOICE WHERE VBELN = I_INVOICE-VBELN.
    ENDIF.
    LOOP AT I_ITEM.
    AT LAST.
    SUM.
    VAR1 = I_ITEM-NETWR.
    ENDAT.
    ENDLOOP.
    CALL FUNCTION '/1BCDWB/SF00000223'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    var = VAR1
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    tables
    i_vbrk = I_INVOICE
    i_vbak = I_ORDER
    i_vbrp = I_ITEM
    i_kna1 = I_ADDRESS
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • PO doesnot exixt while creating purchase order

    Hi all,
    I am getting an error while creating purchase order that " PO number doesnot exist".
    When I repeat creating it, PO with next number is getting created.
    What could be the reason for this?

    Use SM13 and check if you have any entry for the update failure. If yes, analyse with tech person,

Maybe you are looking for

  • IPod says there's no music - iTunes shows all songs are there

    I have a 160 gig iPod Classic that has over 14,000 songs on it and 200+ smart playlists (I leave about 400 meg free for any "new" CD I might get). Yesterday morning, I added several additional smart playlists from iTunes and ejected my iPod. I waited

  • Problem with doing an average

    I wrote this code tonight, the sum, max and min work but I can't compute the average. Secondly, I using 0 to stop the loop, but I would like to use Q how would i do that? Int x = 1; double total = 0; int max = 0; int min = 0; double sum = ( total/ av

  • Why is Apple mouse so limited?

    Coming from a PC, I find the Apple mouse really really annoying and limited. How the **** do I scroll up and down without a scroll wheel? Come on guys, this is 2014. Are you intentionally ******* people off? Do I have to go out and buy a 3rd party mo

  • Hi Folks, Can anyone explain me about below outputs

    Hi Folks, Can anyone explain me about below outputs sh processes cpu-hog Process:      ssm4ge_cfg_poll_thread, NUMHOG: 7, MAXHOG: 4100, LASTHOG: 790 LASTHOG At:   15:21:47 UTC Apr 20 2013 PC:           10ee46b Traceback:    1101e6d  1102227  10eeb8d 

  • How to delete video files that do not work

    Hi there, I am frustrated. I just want to delete video files from my iTunes because they will not work on my iPod...I don't care about all the technical ****, I just want to delete the files so that when I update my iPod, they are taken away. Thanks