Quantcast
Channel: SCN : All Content - All Communities
Viewing all 8800 articles
Browse latest View live

Embed XSD in WSDL

$
0
0

Hi,

 

Vendor has provided a SDK which contains WSDL and XSD's .The set of operations which we need to access from PI is available in WSDL.But, The problem is when I have uploaded the wsdl, I am not able to access the methods/Operation in Message Mapping as the method description is available in XSD. Can you suggest a way to embed XSD along with WSDL?

 

Regards,

Kiran.


BILL OF MATERIAL (BOM IN SAP) - CS01

$
0
0
This Documents Defines what is BOM and Creation of BOM in ECC (CS01) with sample Test Case.

 

Definition of BOM:

 

For manufacturing a product or assembling, list of several components (part of product) are needed.


A well-structured list of Items or Components is known as BOM - Bill of Material.


The list will contain object number of each components and its unit of measure with quantity.


A finished product is a combination of several different component parts or Materials.

1.Types of BOM available in SAP

 

You can create the following BOMs in the SAP system:


  • Material BOMs
  • Equipment BOMs
  • Functional location BOMs
  • Document structures
  • Order BOM
  • Work breakdown structure (WBS) BOM


BOM can be act as basic for several activities in Production department , some of the examples are :


1.MRP Department:


    BOM data can be used to calculate cost-effective order quantities for materials.

 

2.Work scheduling department:


    BOM data can be used for operation planning and control.

 

3.Production order management department:


    BOM data can be used to plan the provision of materials.


4. Sales Order


    When you enter the material number of a bill of materials that is relevant for sales order processing, the system displays the material         that describes the whole bill of materials as a main item. The individual components are displayed as lower-level items.

 

5. Reservation

 

6. Product Costing

 

    Product Costing, part of the Controlling module, is used to value the internal cost of materials and production for profitability and              management accounting.

 

2.Parts of BOM

 

BOM Usage :

It is a Key which defines different areas of a Company where the BOM can be used.


BOM Item Category :

 

Categorization of the items in a BOM according to set of criteria, such as whether they refer to an object or whether they are kept in stock.

 

  • This categorization allows you to process data that is relevant to the individual items in a BOM. The item category is used to control field selection, default values for BOM maintenance, triggering of specific system activities, and so on.

 

  • For example :

                         1.Documentation Item,

                          2.Stock Item,

                         3.Packing Item...,


  • SAP R/3 system allows you to create individual BOM depending upon the area in your company.

 

Define BOM Usages:

 

In Customizing for Production, define individual BOM usages for the different areas within your company by choosing Basic data -->Bill of Material --> General data -->BOM usage -->Define BOM usages.

 

You can define BOM usages for the following scenarios:


  • You maintain separate BOMs for different areas within your company, such as design or production.
  • You create just one BOM for all areas within your company.


Alternative BOM:


  • Alt BOM is used to define BOM in a BOM group.


  • By default system will consider next ALT. BOM Number if user won’t enter any Alt BOM Number.


  • If user enter any Alt. BOM , then system will validate Alt BOM.

 

3.Structure of a BOM

 

Structure of BOM consists of BOM Header and BOM Items as described below.

 

3.1.BOM Header:

 

  •      BOM Header consists of DATA Related to BOM, which consists of Plant, Material,Technical Type, Revision Label, etc…

 

  •      BOM Header maintains data refer to entire object .

 

  •      Refer to single Header Multiple BOM’s would be created which will be maintained by ALT BOM.

 

3.2.BOM Item :

 

Each part of a final Product is called BOM Item , A product is a collections BOM Items .It consists of Item Number, component Quantity , Item Category, Unit of Measure, Item id .

 

3.3.Sub Items:


Partial quantities of a BOM item may be installed at different points. Sub-items are used to describe the different installation points of these partial quantities. Sub-items have no operational function in the BOM.           

 


4.BOM Creation in SAP ECC


Transaction for BOM creation  is CS01 .


1.Initial Screen for BOM creation :

 

1.png

 

Mandatory Fields for entering into next screen are Material, Plant and BOM Usage as per Requirement and by default Alt will pick up as next value to available Alt BOM.


3.png


Click on Header Icon for header details :


4.png


As shown below by default system with Pick 1 as base Qty and Base UOM will be picked from Material Base UOM.


5.png

 

Create BOM Items :


Enter Item Components along with component Qty,UOM,Item Category as shown below.

 

6.png

5.BOM Creation Sample Code in ECC :


Scenario :


Create Material  BOM along with items and define Production Version .


Define ztables and structure as per the requirement .


Create a class and method for BOM creation with Importing Parameters and exporting parameters as :


I_BOM HEADER

I_BOM_ITEMS

E_RETURN

 

 

*Data Declarations

 

  DATA : lit_bom_header     TYPE TABLE OF zsbom_header,

         wa_bom_header        TYPE zsbom_header,

         wa_bom_head           TYPE zsbom_header,

         lit_bom_head            TYPE TABLE OF zsbom_header,

         wa_bom_h                TYPE zsbom_header,

         lit_bom_items           TYPE TABLE OF ztbom_items,

         wa_bom_items         TYPE ztbom_items,

         wa_bom_i                 TYPE zsbom_items,

         lit_bom_items_table   TYPE TABLE OF zsbom_items,

         lit_bom_item_table     TYPE TABLE OF zsbom_items,

         wa_bom_item_table   LIKE LINE OF lit_bom_item_table,

         lit_cost_bom_items   TYPE TABLE OF ztt_bom_item,

         lit_bom_item             TYPE ztbom_items,

         i_mast              TYPE  TABLE OF mast,

         lv_role             TYPE zrole,

         lv_verid            TYPE mkal-verid,

         lv_verid1           TYPE mkal-verid,

         lv_bstma            TYPE char13,

         lv_bstmi            TYPE char13,

         lv_stlal            TYPE stlal,

         lv_idnrk            TYPE idnrk,

         lv_flag             TYPE char1,

         lv_phassign(4)      TYPE c,

         lv_ph_desc          TYPE string,

         wa_error            TYPE bapiret2,

         lit_error           TYPE TABLE OF bapiret2,

         persistent_ref      TYPE REF TO zcl_d_persist_bom,

         obj_ref             TYPE REF TO zcl_d_bom,

         l_msg               TYPE bapiret2-message,

         l_warnings          TYPE capiflag-flwarning,

         l_stpo              TYPE TABLE OF stpo_api02,

         wa_stpo             LIKE LINE OF l_stpo,

         l_stko              TYPE TABLE OF stko_api02,

         lv_matnr            TYPE csap_mbom-matnr,

         timestamp           TYPE tzonref-tstamps,

         obj_bom             TYPE REF TO zcl_d_bom.

 

  TYPES : BEGIN OF ty_mast,

              matnr TYPE mast-matnr,

              werks TYPE mast-werks,

              stlan TYPE mast-stlan,

              stlal TYPE mast-stlal,

            END OF ty_mast.

 

  DATA : lit_mast  TYPE STANDARD TABLE OF ty_mast,

         wa_mast   TYPE ty_mast,

         lit_mast1 TYPE TABLE OF mast,

         lv_index  TYPE sy-tabix,

         lv_itmid  TYPE bapi1080_itm_c-item_id.

 

  DATA : bom_items         TYPE STANDARD TABLE OF zsbom_items,

         lit_bom_item_temp TYPE  STANDARD TABLE OF zsbom_items.

 

 

  DATA : lit_stas  TYPE TABLE OF stas,

         wa_stas   TYPE stas,

 

         lit_ausp  TYPE TABLE OF ausp,

         wa_ausp   TYPE ausp,

 

         wa_mast1  TYPE mast,

 

         lit_stpo1 TYPE TABLE OF stpo,

         wa_stpo1  TYPE stpo,

 

         lit_inob  TYPE TABLE OF inob,

         wa_inob   TYPE inob.

 

  DATA : lv_objek   TYPE inob-objek,

         lv_date    TYPE rn1datum-datex,

         lv_stlnr   TYPE mast-stlnr,

         lv_counter TYPE i.

 

  DATA : lit_bom_hrep      TYPE TABLE OF ztbom_head_rep,    "Historical Report declarations

         wa_bom_hrep        TYPE ztbom_head_rep,

         wa_bom_hrep1       TYPE ztbom_head_rep,

         lit_bom_hist_temp  TYPE TABLE OF ztbom_head_rep,

         wa_bom_hist_temp  TYPE ztbom_head_rep,

         wa_bom_hist_temp1 TYPE ztbom_head_rep,

         lit_ampl          TYPE TABLE OF ampl,

         wa_ampl           TYPE ampl,

         lit_bom_irep      TYPE TABLE OF zsbom_i_report,

         wa_bom_irep       TYPE zsbom_i_report,

         wa_bom_itemrep    TYPE ztbom_item_rep,

         lit_hist_msg      type ztd_hist_msgs,

         wa_hist_msg       type ztd_hist_msgs.

 

* internal table that have to be passed to the bapi

          DATA :  lit_bomgroup TYPE STANDARD TABLE OF bapi1080_bgr_c,

                  wa_bomgroup   TYPE bapi1080_bgr_c,

                  lv_bom_text   TYPE string,

                  lv_plant      TYPE ztbom_header-werks,

 

                   lit_variants TYPE STANDARD TABLE OF bapi1080_bom_c,

                   wa_variants  TYPE bapi1080_bom_c,

 

                   lit_items    TYPE STANDARD TABLE OF bapi1080_itm_c,

                   wa_items     TYPE bapi1080_itm_c,

 

                   lit_matrel   TYPE STANDARD TABLE OF bapi1080_mbm_c,

                   wa_matrel    TYPE bapi1080_mbm_c,

 

                   lit_itemas   TYPE STANDARD TABLE OF bapi1080_rel_itm_bom_c,

                   wa_itemas    TYPE bapi1080_rel_itm_bom_c.

 

 

*-->Check BOM Existency

 

          CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

            EXPORTING

              input  = i_bom_header-matnr

            IMPORTING

              output = lv_matnr.

 

 

          SELECT SINGLE stlnr FROM mast INTO lv_stlnr WHERE matnr = lv_matnr

AND werks = i_bom_header-werks

AND stlal = i_bom_header-stlal AND stlan = '1'.

          IF lv_stlnr IS  INITIAL.

 

*  assign bom usage to 1.

            IF wa_bom_h-stlan IS INITIAL.

              wa_bom_h-stlan = zif_d_constant=>c_production_bom_usg.

            ENDIF.

 

* assign bom text bases on condition

            lv_plant = wa_bom_h-werks.

            IF lv_plant+0(2) = '10'.

              CONCATENATE 'BOM For' wa_bom_h-maktx INTO lv_bom_text SEPARATED BY space.

            ELSE.

              lv_bom_text = ' ' .

            ENDIF.

 

wa_bomgroup-bom_group_identification = 'BAPI_SMP_COL1'.

            wa_bomgroup-object_type = 'BGR'.

            wa_bomgroup-object_id = 'SIMPLE1'.

            wa_bomgroup-bom_usage = wa_bom_h-stlan.

            wa_bomgroup-created_in_plant = wa_bom_h-werks.

            wa_bomgroup-ltxt_lang = sy-langu.

            wa_bomgroup-technical_type = ' '.

            wa_bomgroup-bom_text = lv_bom_text.

            APPEND wa_bomgroup TO lit_bomgroup.

 

            IF wa_bom_h-datuv IS INITIAL.

              wa_bom_h-datuv = sy-datum.

            ENDIF.

 

*UOM Conversion :

 

            CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'

              EXPORTING

                input          = wa_bom_h-bmein

              IMPORTING

                output         = wa_bom_h-bmein

              EXCEPTIONS

                unit_not_found = 1

                OTHERS         = 2.

 

*Define Varaints

 

wa_variants-bom_group_identification = 'BAPI_SMP_COL1'.

            wa_variants-object_type              = 'BOM'.

            wa_variants-object_id                = 'SIMPLE1'.

            wa_variants-alternative_bom          = wa_bom_h-stlal.

            wa_variants-bom_status               = wa_bom_h-stlst.

            wa_variants-base_qty                 = wa_bom_h-bmeng.

            wa_variants-base_unit                = wa_bom_h-bmein. " base unit

            wa_variants-alt_text                 = wa_bom_h-alternate_text.   " alternative text

            wa_variants-valid_from_date          = wa_bom_h-datuv.

 

            wa_variants-function = 'NEW'.

            APPEND wa_variants TO lit_variants.

 

            CLEAR lv_itmid.

            LOOP AT bom_items INTO wa_bom_i.

              CLEAR wa_items.

 

              MOVE-CORRESPONDING wa_bom_i TO wa_bom_items.

 

              IF wa_bom_items-posnr IS INITIAL.

                wa_bom_items-posnr = '0010'.

              ENDIF.

 

              IF wa_bom_items-postp IS INITIAL.

                wa_bom_items-postp = 'L'.

              ENDIF.

 

              IF wa_bom_items-datuv IS INITIAL.

                wa_bom_items-datuv = sy-datum.

              ENDIF.

 

              CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

                EXPORTING

                  input        = wa_bom_items-idnrk

                IMPORTING

                  output       = wa_bom_items-idnrk

                EXCEPTIONS

                  length_error = 1

                  OTHERS       = 2.

 

 

* Details of the items of the variants

 

*to convert the uom for bom item

 

              CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'

                EXPORTING

                  input          = wa_bom_items-meins

                  language       = sy-langu

                IMPORTING

                  output         = wa_bom_items-meins

                EXCEPTIONS

                  unit_not_found = 1

                  OTHERS         = 2.

 

              CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

                EXPORTING

                  input  = wa_bom_items-vendor_no

                IMPORTING

                  output = wa_bom_items-vendor_no.

 

              wa_items-bom_group_identification = 'BAPI_SMP_COL1'.

              wa_items-object_type              = 'ITM'.

              wa_items-object_id                = 'SIMPLE1'.

              wa_items-item_no                  = wa_bom_items-posnr.

              wa_items-item_cat                 = wa_bom_items-postp ."Item Category

              wa_items-comp_unit                = wa_bom_items-meins. " bom uom added

              wa_items-alt_item_prio            = wa_bom_items-alprf. " priority added

              wa_items-usage_prob               = wa_bom_items-ewahr. " usage probability added

 

*-->Sort String

              IF wa_bom_items-sortf IS NOT INITIAL.

                wa_items-sort_string              = wa_bom_items-sortf." sort string added

              ELSE.

                SPLIT wa_bom_items-zph_assign AT '-' INTO lv_phassign lv_ph_desc.

                CONDENSE lv_ph_desc.

                wa_items-sort_string              = lv_ph_desc .

 

              ENDIF.

*-->End of Sort String

 

              wa_items-component                = wa_bom_items-idnrk.

              wa_items-comp_qty                 = wa_bom_items-menge.

              wa_items-item_text1               = wa_bom_items-ktext. "Bom component description added

              wa_items-alt_item_group           = wa_bom_items-alpgr.  " Bom Alt Item Group

              wa_items-valid_from_date          = wa_bom_items-datuv.

              wa_items-iss_st_loc               = wa_bom_items-lgort."storage plant

 

 

*-->Alt Item Strategy

              IF wa_items-alt_item_group IS NOT INITIAL.

                wa_items-alt_item_strategy = '2'. "Alt Item Strategy

              ELSE.

                wa_items-alt_item_strategy = ' '.

              ENDIF.

 

              IF wa_bom_items-idnrk CP '35*'.

                wa_items-class_type        = '023'.

                wa_items-vendor_no         = wa_bom_items-vendor_no.

              ENDIF.

 

              APPEND wa_items TO lit_items.

              CLEAR  wa_items.

            ENDLOOP.

 

            CLEAR lv_itmid.

 

            CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

              EXPORTING

                input        = wa_bom_h-matnr

              IMPORTING

                output       = wa_bom_h-matnr

              EXCEPTIONS

                length_error = 1

                OTHERS       = 2.

 

*creation of production BOM

 

            IF wa_bom_h-stlan IS INITIAL.

              wa_bom_h-stlan = 1.

            ENDIF.

 

*--From Lot size and to size------------*

 

            IF i_bom_header-werks CP '10*'.

 

              lv_bstmi = zif_d_constant=>c_bstmi.  "BASE QUANTITY

              lv_bstma = zif_d_constant=>c_bstma.

              CONDENSE lv_bstma.

              CONDENSE lv_bstmi.

            ELSE.

 

              lv_bstmi = zif_d_constant=>c_bstmi.

              lv_bstma = zif_d_constant=>c_bstma.

              CONDENSE lv_bstma.

              CONDENSE lv_bstmi.

            ENDIF.

 

* Details of the materials of the different variants

            wa_matrel-bom_group_identification = 'BAPI_SMP_COL1'.

            wa_matrel-material                 = wa_bom_h-matnr.

            wa_matrel-plant                    = wa_bom_h-werks.

            wa_matrel-bom_usage                = wa_bom_h-stlan.

            wa_matrel-alternative_bom          = wa_bom_h-stlal.

            wa_matrel-lot_size_from            = lv_bstmi.

            wa_matrel-lot_size_to              = lv_bstma.

            APPEND wa_matrel TO lit_matrel.

 

* Linking items to the corresponding variants

            wa_itemas-bom_group_identification = 'BAPI_SMP_COL1'.

            wa_itemas-sub_object_type          = 'ITM'.

            wa_itemas-sub_object_id            = 'SIMPLE1'.

            wa_itemas-super_object_type        = 'BOM'.

            wa_itemas-super_object_id          = 'SIMPLE1'.

            wa_itemas-valid_from_date          = wa_bom_items-datuv.

            wa_itemas-function                 = 'NEW'.

            APPEND wa_itemas TO lit_itemas.

 

* call function to create bill fo materail by using

* the previously declared local internal tables

 

            SORT lit_items BY object_id valid_from_date.

            CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'

              EXPORTING

                all_error         = 'X'

              TABLES

                bomgroup          = lit_bomgroup

                variants          = lit_variants

                items             = lit_items

                materialrelations = lit_matrel

                itemassignments   = lit_itemas

                return            = e_return.

 

            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

 

*----END OF Production BOM CREATION-----------------------*

 

References:

 

http://braincybersolutions.com/sap-tutorials/pp/bom-in-sap-bill-of-material/

http://help.sap.com/saphelp_46c/helpdata/en/ea/e9af734c7211d189520000e829fbbd/frameset.htm

Delta Init from DSO to cube different from Full load...

$
0
0

Dear Gurus,

 

I am stuck with a behaviour I have never seen. I have a DSO that loads a cube.

When I run the delta init DTP for the first time, I get only 500K records extracted among the 1,2 million I have in the DSO. If I decide to run the Full DTP to check, and if I run it, I get the 1.2 million records.

My first run is set to take the active data, not the change log

 

Does anyone have a clue on that ? I might be missing something very simple, but may too simple ;-)

We are on BW 7.3 SP 5 on top of MSSQL DB

 

Thanks

 

PY

LSMW only works in foreground not in background?

$
0
0

Hi Experts,

I recently started doing LSMW for OM data. I am working on uploading infotype 1000 data but it is only working in foreground but not in background. Where could be the issue? Could you give some hint on fixing it? I am   a functional person and not technical.

 

Thanks,

Juliana..              

Email Sending Functionality for Different Business Process in Sap

$
0
0

Email Sending Functionality for Different Business Process in Sap

Nov, 2013

 

 

Introduction

Every Business Process in SAP Follow different communication types to communicate with its Business partners like Print and send via post, Fax, and Email (Internet).Several E-mail communications need to be sent to Vendors & Customers who are the business partners for the organization which contains several Business Processes like Payment Advice, Dunning forms and PO’s etc., with PDF and Excel as attachment, which is a very eco-friendly way. Presently many are using the process of taking a print out and sending it through the post. This Process has lot of paper wastage. So instead of this we can send a mail which saves lot of paper wastage .This process enables the Go green Initiative and reduces lot of manual effort. With the recent releases in SAP all the Business process are enhanced with Email sending functionality.

Introduction to Email Processes

Every Standard FI process like Dunning and Payment and collection advice has a default way of sending there notices to the customer or vendor by post. Sending a mail is not a standard SAP functionality; in order to achieve this nonstandard Functionality we have BTE.  This is an enhancement technique (Open FI) that was developed for Financial Accounting component. This functionality is primarily used in FI in the areas of dunning, Payment advice Customer and Vendor Statement etc. Each of them has their own Function modules which will not interfere with each other.

           Each of these has a BTE’s enabled to fill the FINNA-NACHA structure to determine whether the output should be sent as fax, print via post or email, i.e., if FINAA-NACHA = 1 - print via post and FINAA-NACHA = ‘I’ its email and if its ‘2’ FAX.

This Document contains how this mail functionality can be achieved by using the BTE’s for Different applications in FI.

1. Application Area: FI - Accounts payable and Accounts receivable – Dunning

     Application of the process BTE event '00001040' -

· This process BTE is useful during a dunning run when a dunning notice needs to be sent to the customer by the medium of an electronic form (EMAIL).
As a default property, the dunning notice gets printed and is sent to the customer either by scanning the copy or via 'POST'.

· This same dunning notice could be a very beneficial if it is sent by means of electronic form directly after the dunning has been carried out.

· So, to achieve this non-standard functionality we need to enhance the standard process.

      Transaction - FIBF -> Environment -> Info systems (Processes)

· Click on execute,

 

· Select the BTE 00001040 as it deals with the Output device/medium

Fig1.jpg

· Change the Already Present function module to Z function Module.

fig2.jpg

Now, technically the BTE is ready to work as we have registered the BTE.

As a functional aspect, the following things are needed to be taken care of.

· Standard communication option - to 'EMAIL' in the 'General' Tab in customer master 'XD02/01'.

fig3.jpg

· After configuring these basic steps, the BTE is complete to trigger for dunning run for this particular customer.

     Dunning Run

· SAPF150D2-This Program can be used to execute the Dunning form by giving the Run date and identification and the logic in the FM's can be checked by placing the debugger.

· Best way is to check in the debugger,

fig4.jpg

Ø  FINAA-NACHA - For Communication Medium (I- Internet, 1-Print Out, 2-Fax)

Ø  FINAA_INTAD – Email Address to send the PDF

 

Fig5.jpg

Ø Process the next step by confirming the 'Send to mail' dialog,

Ø If 'C_FINAA-INTAD' is left blank the system will pick from the customer master 'Clerks internet', else it will take from the value 'C_FINAA-INTAD'. This enables the PDF sending functionality which enables is standard process and the logic to send excel can be written in the above FM only. Also if you need to fill the Subject of Email use itcpo-tdtitle structure which of 50 characters. If we need to send the Body also Maintain the standard text as mentioned in the below screen shot.

fig6.jpg

NOTE: If we need to send many attachments other than PDF we have to write the code in the above FM call the common mail sending functionality. In this case first a mail will be sent with Excel or some other as attachment then the standard PDF functionality is called.

This is a very eco-friendly means of informing the customers for their over-due items.

 

 

2. Application Area: FI – Payment Advice and Collection Advice:

     Application of the process BTE event '00002040' –

This BTE is called in the standard include RFFORI06 as shown below.

fig7.png

· In the transaction FIBF Select the BTE 00002040 as it deals with the Output device/medium sample_process_00002040 will be assigned.

 

· Since this is not a standard functionality we need to enhance the FM so copy the

sample_process_00002040 into Zsample_process_00002040.

Logic in the FM

Check if customer or Vendor has Email Maintained in the Master Data. If it’s maintained then

· The structure c_finna included the internet address.

          We set the transmission medium to ‘I’ as below.

          c_finaa-nacha = 'I'.

          c_finaa-intad = l_smtp_addr(130). [The email Obtained from the master data]

·    Later the mail sending functionality can be called after the close_form as shown in the below screen shot or By OTF data and excel can be created using the tab_regup structure in the   form avis_schreiben.

3. Application Area: FI – Customer/Vendor Balance Confirmation:

     Application of the process BTE event '00002410' –

· This process BTE is useful during a Customer/Vendor Balance Confirmation form which needs to be sent to the Customer/Vendor by an electronic form (EMAIL). By default, the form is sent to the Customer/Vendor either by Fax or via 'POST'.

· But as an environmental aspect to avoid wastage of paper, the same Statement could be sent by means of electronic form directly after the Customer/Vendor Statement run has been carried out.

· So, to achieve this functionality we need to enhance the standard process.

     Transaction - FIBF -> Environment -> Info Systems (Processes)

· Click on Execute.

· Select BTE 00002410 as it deals with Determining the Output Device

fig8.png

· Click on Sample Function Module. The FM 'SAMPLE_PROCESS_00002410' is assigned. In order to include the mail sending functionality, Copy the Function Module into a Z Function Module and make the required changes to enable the mail sending functionality.

     Logic in the FM:

Check if the Customer or Vendor has Email Maintained in the Master Data. If it is maintained then

· The structure c_finna includes the internet address.

We set the transmission medium to ‘I’ as below.

          C_finaa-nacha = 'I'.

         C_finaa-intad = l_smtp_addr(130). [Email Obtained from the master data]

· Later the mail sending functionality can be called after the Close_form as shown in the below screen shot or By OTF data, and excel can be created using the Structure HBSIDH for Customer and HBSIKH for Vendor.

Fig9.png

4. How to achieve Mail Functionality Technically:

Create a Common Functionality for sending mail using classes

i) For sending the subject greater than 255 characters   

· At present using the FM SO_DOCUMENT_SEND_API1 has the capability of sending only 50 characters but using the below method of the class the subject more than 255 characters.

· So cl_bcs class is used for the below purpose.

· There is also any option of changing the sender ID in case the requirement is not    to use the           

· SAP master User ID using the cl_bcs  class.

· Create the below object of type cl_bcs  and call the method  set_message_subject        

          w_send_request     TYPE REF TO cl_bcs           VALUE IS INITIAL,      
     
CALL METHOD w_send_request->set_message_subject
       
EXPORTING
          ip_subject = subject.

ii) For Sending Multiple Attachments like PDF and Excel

· In case multiple attachments the below method add_attachment attachment can be used by looping on the attachments obtained to this function module.

     f_ATTACHMENTS    TYPE      RMPS_T_POST_CONTENT

      w_document       TYPE REF TO cl_document_bcs  VALUE IS INITIAL,

     
LOOP AT attachments INTO f_attachment.


        w_attachment_subject = f_attachment-subject.
        w_filesize = f_attachment-docsize.

· This Method will have the option to take input as method subject, filesize and
        w_document->add_attachment(
       
EXPORTING
        i_attachment_type    = f_attachment-doc_type
        i_attachment_subject = w_attachment_subject
        i_attachment_size    = w_filesize
        i_att_content_text   = f_attachment-cont_text[] ).

      ENDLOOP.

    iii) For Sending Email to multiple recipients like To, BCC and CC,

· The below Logic can applied to provide cc bcc and to as like multiple receivers. The method

add_recipient   has the option to give blind_copy, Copy and recipient.

w_recipient      TYPE REF TO if_recipient_bcs VALUE IS INITIAL,

· Loop at the multiple receivers

LOOP AT receivers INTO f_receivers.

          w_recipient_mail = f_receivers-receiver .

· The below method sets them mail ID of the Receiver.
          w_recipient = cl_
cam_address_bcs=>create_internet_address(
                         w_recipient_mail).

        w_send_request->add_recipient(
           
EXPORTING
            i_recipient = w_recipient
            i_express =
'X'
            i_copy = f_receivers-copy
            i_blind_copy = f_receivers-blind_copy).
ENDLOOP.

Find the PING url of my SAP server.

$
0
0

Following the ttorial from http://scn.sap.com/thread/3436603 . there's a step where we need to mention the PING URL of SAP system . I have also read some where about SICM transaction to find this . but the SICM transaction throws does not exist in our logon pad. how can PING url can be found ?

#unavailable ???

$
0
0

Hi gurus,

 

I have a dimension holding date format data and when I use it with Month(Date) like formula one column values turned to #unavailable.Isn't that very interesting that the change for one particular column effects other.

 

The source is BEx and sales order cube is on use. I would really appreciate your returns.

 

Eddy.

modulepool program with me23n tcode

$
0
0

Hi forum,

         How to create HEADER TEXTin module pool program which is in me23n transaction code .



Expecting ur answers,....

Thanks In advance,

Azhar


Sum shared numbervar in group footer

$
0
0

Hi Experts,

 

I have a problem to sum the group footer totals correctly.

This is the situation;

------------

Main report:

 

productcode -A- (group header 1)

 

Invoicenumber 1     10 euro (record comes from sub report 1)

                         2     20 euro (record comes from sub report 1)

                         3     30 euro (record comes from sub report 1)

                         4     40 euro (record comes from sub report 2)

                         5     50 euro (record comes from sub report 2)  

 

product code -A- (group footer 1) Total : 90 euro (sum of records from sub report 2 via shared numbervar)

 

productcode -B- (next record group header 1)

 

Invoicenumber 4     20 euro  (record comes from sub report 2)                           

                         5     30 euro (record comes from sub report 2)

 

product code -B- (group footer 1) Total : 50 euro (sum of records from subreport 2 via shared numbervar)

 

----------------------------

And now the problem: I am trying to sum the records from product code A, invoice numbers 1,2,3 with the sum of the records from sub report 2.

It should give me a total of 150 euro instead of the 90 euro. I have no problem to get this done via a shared numbervar formula. But the problem is that the Total of product code B increased also with this shared numbervar formula, so the total of productcode B becomes 110 euro instead of 50 euro.

Is there a way to solve this ? Is there a solution to make sure it will only sum for the correct product code?

how to update the equipment number in Va02 Through Dp90

$
0
0


Hi All,

 

  how to update the Equipment field in Va02 (Extras-----> technical objects) through Dp90 transaction..my enhancement should triggere when ever billing request is generated in dp90.DP90 transaction will contains the contract number and equipment number.we have to get this equiment number and update in Va02..

 

If any body worked on Technical objects please let me know how to do this enhancement...(updating field value on Va02)

 

 

Thanks,

rasool.

Batch Job for automatic goods receipt keeps failing

$
0
0

Hello SAP experts,

 

We are experiencing an issue with one of our batch jobs that automatically post goods receipts whenever the PO value is less than a limit value specified in the variant of the job. The short dump analysis is as follows:

 

Error analysis

    An exception occurred that is explained in detail below.

    The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was no

     caught in

    procedure "BBP_ICC_READ_BRAZIL_PO" "(FUNCTION)", nor was it propagated by a

     RAISING clause.

    Since the caller of the procedure could not have anticipated that the

    exception would occur, the current program is terminated.

    The reason for the exception is:

    In the executed program "SAPLBBP_COUNTRY_BR", the system attempted to access

     the field

    "WA_DATA" using the length 0.

    However, a partial field access with the length specification 0 is not

    allowed.

 

I hope I can have your insights regarding this. Thanks!

revision history page to be developed for the routing,bom,prt changes in assembly operation sheet

$
0
0

Hi,

How to develop the revision history page in assemby operation sheet (aos) of Routing changes, bom changes and Production resource Tools (PRT) Changes. Detail view of the scenario is whenever any changes done in routing, bom and PRT that changes should reflect as previous and changed one. For this i have seen the CA61. In this changes are reflecting but how to get the page of this changes. CEWB also there for change history But i want the changes history page to be developed revision wise. please guide me ?

 

Regards,

Mastan.

How to remove / hide unwanted request in Mss-Tas bar?

$
0
0

Hi Friends,

 

 

Please help on the bellow MSS task issue,

 

 

In task we are getting unwanted requests along with leave requests

 

 

How to remove / hide unwanted leave request?

 

 

Please check bellow screen shot

 

 

 

 

Untitled.png

ole2_object + clipboard_export issue if same file name give

$
0
0

i am using ole2_object + clipboard_export to download data into excel.If i give file name which already exist, system is processing continuously and no end.If i give new file name it works fine.Please suggest.

SUP 2.1.3 OData Proxy SAP NetWeaver Gateway and DCN

$
0
0

Hi everybody,

 

if I am using the SUP 2.1.3 as OData proxy connected to the SAP NetWeaver Gateway,

is there a possibility to send DCNs from the SAP Backend over the SUP to a special user?

 

Thanks in advance


SMP 2.3 - Pass data from one MBO to another [Android]

$
0
0

Hi,

I'm trying to create a scenario where I'll make an MBO from a BAPI which will give me certain details using which I can query on a second MBO made from some other BAPI. I'll try to explain this with an example.

 

MBO 1: I create it using BAPI_BANK_GETLIST. The input parameter to this is BANKCOUNTRY. So when I enter bank country (say "IN" for eg.), I should be able to fetch all the BANKKEYs and maybe populate them in a spinner.

 

MBO 2: Now that I have a list of all the BANKKEYs. I pass this detail to the MBO that I want to create from BAPI_BANK_GETDETAIL. The input parameters to this are BANKKEY& BANKCOUNTRY. I already have BANKCOUNTRY from the field in which I enter "IN" the first time, to fetch BANKKEYs and I'll also be able to select a BANKKEY from the spinner item. So I should be able to query on this MBO using the BANKKEY and BANKCOUNTRY and it should return me the details of the bank.

 

What is the best and efficient way to create the above scenario? I have been able to achieve this in a very crude way, but I can very well understand that it is not a very good way to do this.

 

In my workaround I have created the MBOs as below:

I have created 1 personalization key for Bank_List and 2 personalization keys for Bank_Details. However, when I synchronize both the MBOs get executed together, so I have to load the personalization parameters with dummy values each time I query on the MBOs. When I query on Bank_List, I load the Bank_Detail with dummy personalization parameters and vice versa.

 

I'm unable to think as to how to link the MBOs and how to query on only one MBO at a time. Maybe I need to use different synchronization groups? Or maybe some other logic? But, I stand confused. Somebody please explain me the working and guide me to achieve this, the CORRECT way.

 

I'll link to a video of what I'm trying to achieve (which I have already done in an incorrect way).

 

Thank you all in advance!

Error during conversion of query result to XML: java.lang.ArrayIndexOutOfBoundsException: 101 error in JDBC sender channel

$
0
0

Hello All,

 

We are facing the below error in JDBC sender adapter when trying to pick records from a table. The error is as below:

 

Error: Error during conversion of query result to XML: java.lang.ArrayIndexOutOfBoundsException: 101


Checked the data in the table but didn't find any issues with the data i.e., the DATE fields are not null etc., We are facing this issue in prod from last couple of (2) days and everything was fine earlier. The db table structure is as given below:


jpod.JPG

Replicated recent (2 days) data to QA instance and there the same jdbc adapter was picking up the data successfully. Finally in worse case, for test purpose, connected PI QA jdbc channel to prod db table and encountered the same error as mentioned above.


Seemed to be an issue with the db table / data, but couldn't figure it out why java.lang.ArrayIndexOutOfBoundsException: 101 is being throwed in the jdbc sender channel while picking the data.


Could someone pls throw some light on the issue.



Br,

Saiganesh.




Issue with Create Follow-up in Service request when trying to create service process in SAP CRM IC

$
0
0

Hello Gurus,

 

When i am trying to create a Service process from a Service request which is in error state using create follow-up button, it is directly taking me to creation of Task screen.

 

When the service request is not in error state, it is giving me a pop up to create a service process or Task. Is there are way to get the pop up to create service order even if the service request is in error state?

 

Thanks in Advance!!

Lakshman

Goods Movement Bapi for Subcontracting PO

$
0
0

Hi

I want to consume the actual consumption of components which was provided to vendor for subcontracting PO. While executing BAPI_GOODSMVT_CREATE for sub contracting PO , system automatically takes the consumption of the component  based on BOM.

My requirement is that consumption of material should be based on actual consumption which i am storing during the process.

Any idea how can i do it using the bapi??

GL report not showing in proper sort order

$
0
0

Hi all,

I have opened the GL report which is in Reports-> Financial-> Accounting->GL Report, I am getting the data correctly but the order of the data is not correct, Suppose it showing the data order by BP, but Under BP001 its showing other BP's(BP002,BP003) data also. Can any one tell me whether it's a SAP report issue or what?

refe: see the attachment

Viewing all 8800 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>