Quantcast
Channel: SCN : All Content - ABAP Connectivity
Viewing all 1442 articles
Browse latest View live

LSMW Error - No batch input data for screen SAPLMGMM 0080

$
0
0

Hi,

 

When run the Batch Input Session (very last step) in Foregroud in LSMW. The system does not take the Plant value automatically and give sthe Error saying "No batch input data for screen SAPLMGMM 0080'. And when I enter Plant value manually then the error reappears on the other screen saying "No batch input data for screen SAPLMGMM 4004".

 

1) Field mapping is Ok.

2) Read and Converted data shows all the values correctly.

3) I have checked the Tab delimited text File - It is Fine.

 

Can anyone tell why is this error appearing while running the Batch Input Session ?

 

Thanks.


Call Transaction via RFC

$
0
0

Hi All,

 

I'm having a requirement in which a client needs to connect to another SAP system via its own SAP system. I did found a solution for that, by using RFC function module ABAP4_CALL_TRANSACTION but the problem now is that as soon as a user completes a transaction in another SAP system it comes back to my SAP system without showing any status messages like for example -

 

User want to create a sales order, he enters the the T-Code VA01 and executes the program which will navigate him to another SAP system VA01 screen. There he would fill in the details and click on SAVE there by returning back to my SAP system!

 

Now my question is - are there any ways' as to, I can allow a user to continue creating sales order in another SAP system, or somehow capture a success message (standard behavior while creating any document to show the screen again with a generated number as success message) in my system thereby allowing him to process further with that generated document?

 

Thanks & Regards,

Varun Kumar Sahu

LSMW: Codepage conversion error with a Unicode data file

$
0
0

Hi all,

 

I am currently developing a LSMW upload program which has to use a Unicode data file. The underlying system/target system is NOT a Unicode system. The data file also contains non-Latin2 characters.

 

In the step "Specify Files", I have specified my Unicode data file and specified the codepage type "4110 - Unicode UTF-8".

 

In the step "Read Data", then I get the runtime error "CONVT_CODEPAGE", exception "CX_SY_CONVERSION_CODEPAGE".

 

I would expect that all non-Unicode characters are automatically transformed to "#", but the conversion progam breaks. The character transformation to "#" would be fine.

 

I am really wondering why, at first, I am able to specify the Unicode codepage type, but then, the file cannot be converted correctly.

 

What do I make wrong, what can I do to avoid the error?

 

Thanks a lot in advance for helping me out...

 

Regards,

Klaus

Error in '/SAPDMC/LSM_TARGET_FIELDS_GET' for argument BGR00

$
0
0

Hi Expert,

 

In LSMW,  in the step 5 Maintain Field Mapping and Conversion Rules, there is a issue  u201CError in '/SAPDMC/LSM_TARGET_FIELDS_GET' for argument BGR00u201D, who can help me, thanks very much.

 

In addition, in Maintain Object Attributes, the Object is 00040, the Method is 0001.

 

 

Best Regards,

Andrew

BLAOCH Contract change ignores UoM

$
0
0

When receiving a BLAORD (MM Contract creation) IDoc, the target quantity is recalculated to the base unit of measure. But when receiving a BLAOCH (MM Contract creation) IDoc, the target quantity is not recalculated to the base unit of measure, so this leads to incorrect quantities.

 

Example

1 BLAORD IDoc 999.000 KGM

è The base unit of measure (inforecord/material master) is Ton so the contract is created as 0.999TO -> This is correct

 

2 BLAOCH IDoc 999.000 KGM

è The contract is changed into 999.000TO -> This is NOT correct

 

Thanks for your help in advance!

BDSER Object value not updated

$
0
0

When receiving IDoc's of serialization type EBELN, the Object value (OBJVALUE) is not updated in table BDSER. This can result in the following situation:

 

09:05:08h IDoc 1, serialization ID 20131206090508 - EBELN 4622601 -> error

09:33:07h IDoc 2, serialization ID 20131206093307 - EBELN contract 4622602 -> correct, processed

11:00:00h Repair and reprocess IDoc 1 -> error “This change has been superseded by another”

 

If both IDoc’s would have been for the same EBELN then this would be a correct message, but this is not the case. Seems like it is caused because in table BDSER the serialization ID of the latest IDoc is 20131206093307 and the Object value is empty so the system interprets 20131206090508 as an older IDoc which was superseded by IDoc 2. I think that if the Object value would have been filled with the EBELN number, we shouldn’t have had this problem.

 

What settings do I have to change to have BDSER-OBJVALUE updated with the EBELN number?

 

Thanks in advance.

Changing the Sequence of attachment & payload

$
0
0


Hi Folks,

     I have created proxy program which sends an attachment to the XI system Along with the payload. The sequence is as below

 

1. Attachment

2. MainDocument(Payload)

 

Seems like the XI folks expect the data to receive in the receive order i.e.

 

1. MainDocument

2. Attachment.

 

The below is the code I wrote

 

 

 

TRY.


    attachment_protocol ?= prxy->get_protocol( if_wsprotocol=>attachments ).

    attachment = attachment_protocol->get_attachment_from_text( data = attach_string type = if_ai_attachment=>c_mimetype_text_plain name = lv_name ).

*    attachment(sequence) = '2'.

    APPEND attachment TO attachments.attachment_protocol->set_attachments( attachments ).

    it-transactional_data_ecc = ls_transactional_data_ecc.



    CALL METHOD prxy->transactional_data_ecc_out

      EXPORTING

        output = it.

    COMMIT WORK.



  CATCH cx_ai_system_fault .

    DATA fault TYPE REF TO cx_ai_system_fault .

    CREATE OBJECT fault.

    WRITE :/ fault->errortext.

ENDTRY.

 

 

Appreciate a quick response.

Saving a generated PDF to FTP

$
0
0

What I'm trying to do is save the PDF output of a Smartform to an FTP server.

 

So far I've been able to generate a file on the FTP site from my ABAP, but it can't be read as a PDF. So apparently I'm losing information during the transfer.

 

I've tried both passing the OTF data from the Smartform FM and passing the PDF table from the CONVERT_OTF FM. The file size changes, but it still can't be read.

 

A part I'm not entirely sure of is the blob_length. In example program x, it's set to the line length of the blob. I've tried the same with the OTF data table and the PDF table... but to no end.

 

This is the code I'm using:

* Scramble password  slen = STRLEN( lv_pwd ).  CALL FUNCTION 'HTTP_SCRAMBLE'    EXPORTING      SOURCE      = lv_pwd      sourcelen   = slen      key         = key    IMPORTING      destination = lv_pwd.

* Connect to FTP server
  CALL FUNCTION 'FTP_CONNECT'    EXPORTING      user            = lv_user      password        = lv_pwd      host            = lv_host      rfc_destination = lv_dest    IMPORTING      handle          = hdl    EXCEPTIONS      not_connected   = 1      OTHERS          = 2.  IF sy-subrc EQ 0.

*   Set the remote directory    CALL FUNCTION 'FTP_COMMAND'      EXPORTING        handle        = hdl        command       = lv_cmd      TABLES        data          = result      EXCEPTIONS        tcpip_error   = 1        command_error = 2        data_error    = 3.    IF sy-subrc EQ 0.      LOOP AT tb_pdf INTO ls_pdf.        ls_blob = ls_pdf.        APPEND ls_blob TO lt_blob.      ENDLOOP.      DESCRIBE TABLE lt_blob LINES lv_lines.      blob_length = lv_lines * 134.

*     Upload file (existing files will be overwritten)      CALL FUNCTION 'FTP_R3_TO_SERVER'        EXPORTING          handle        = hdl          fname         = lv_filename          blob_length   = blob_length        TABLES          blob          = lt_blob        EXCEPTIONS          tcpip_error   = 1          command_error = 2          data_error    = 3          OTHERS        = 4.    ENDIF.

*   Close connection    CALL FUNCTION 'FTP_DISCONNECT'      EXPORTING        handle = hdl.    CALL FUNCTION 'RFC_CONNECTION_CLOSE'      EXPORTING        destination = lv_dest      EXCEPTIONS        OTHERS      = 1.  ENDIF.

 


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.

Regarding 'BAPI_OUTB_DELIVERY_SAVEREPLICA'

$
0
0

Hi,

 

I am using the BAPI 'BAPI_OUTB_DELIVERY_SAVEREPLICA' to post outbound deliveries created in SAP to Legacy system.

I am using the BADI enhancement 'SMOD_V50B0001' and method 'EXIT_SAPLV50K_012' to populate some custom fields in the corresponding IDoc 'SHP_OBDLV_SAVE_REPLICA02' and segment 'E1BPTXT'.

 

Now I want to populate the prameter 'ET_EXTENSION2' of data type 'BAPIEXTT' in method 'EXIT_SAPLV50K_012' of BADI enhancement 'SMOD_V50B0001' .

 

Does any body knows what are the meaning of different fields in data type 'BAPITXT'? If anybody has filled these custom fields before, a demo example will be very helpful to me.

 

Regards,

Nitin

How to create Trust/Trusted RFC relationship

$
0
0

1.Create a RFC destination to the system you want to trust(for example Y57->Y58)

RFC2 - Copy.png

RFC3.png

 

 

2. Create a trusted system in Y57 using the RFC destination you just created.

rfc4.png

rfc6.png

 

rfc7.png

rfc8.png

3. Go to SMT2, you will see trusting system is here.

rfc9.png

 

4. Create a RFC destination without user and password but using "Trust Relationshiop" and "Current user" instaed.

rfc10.png

Now you can use this RFC destination logon to Y57 without enter user and password

BAPI for create/Update Vendor Partner functions (XK02)

$
0
0

Hi,

 

We have a requirement where in we need to update the partner functions of a vendor (table WYT3), transaction XK02.  Is there any BAPI to do so?

 

Regards,

Vinod Nagre

How to use transporting no fields addition in select statement

$
0
0

I just want to check whether a record exists in a table with a given key, is it possible with transporting no fields addition in select statement. If possible please give me an example.

If not tell me if there is another way to do it

BDC/LSMW for creating settlement rules in KO02

$
0
0

Hi Experts,

 

Scenario: At our client, we have the internal orders loaded as part of the go-live. Now that we need to create the process of settling those IOs created using materials data.

 

Has anybody come across BDC/LSMW for creating settlement rules in KO02 for the Internal Orders created. We don't have a newline button or menu option to add extra line while recording. I was thinking is there is no way but to create a custom ABAP program?

 

Waiting for the quick reply! Thanks!

problem with value table

$
0
0

Hi Experts,

 

  i am modifying module pool program in that i found, one field displays the search help values based on the value table maintained at domain level.

As per requirement i have changed the value table name maintained at the domain level. Even i changed the value table..still the search help values taken from old value table instead of new value table..how can avoid this situation..how to provide the search help values based on new value table?


BAPI Checking Invoice

$
0
0

Hi

I need to check if invoice exists in SAP based on vendor no from dot net program.

Is there a BAPI function that I can call from Dot net

Thanks

How to Import and Export data from and to a SQL Server Database

$
0
0

Hi,

 

Greetings, I am novice to SAP and hence need your urgent help in addressing a problem i am facing.

 

We have a system in SQL SERVER. We want to post data to SAP and Fetch Data from SAP.

 

Kindly suggest how can we proceed. I was just told that using BAPI it is possible. Can anyone help me on this please? I don't know what's correct way to proceed using BAPI. whether I need to write BAPI and whether writing BAPI will suffice to push data to SQL Server DB and retrieve and update in SAP?

 

 

Any tool/ setup i need to use to connect to SAP or write BAPIs? Any prerequisites.

 

Thanks in advance. appreciate quick response.

 

Mayuresh

LSMW - Error on batch input for MM41

$
0
0

Hi Expert,

 

I have recorded a batch for inputting MM41.

 

Then I run the batch input screen and choose foreground as the processing mode, the record created succesfully.

However, when changed the process ode background and re-run again.

 

It showed the below error:

 

Runtime error OBJECTS_OBJREF_NOT_ASSIGNED has occurred

 

 

error1.png

 

Would like to know the root cause of the error and any tips when doing recording to prevent this kind of error.

 

Big thanks.

 

Best Regards,

Keith

Pop Up Screen in MIRO

$
0
0

HI Guys,

 

I have one requirement I want to call one POPUP screen in MIRO TCODE after pressing the saving button.

 

I found one exit EXIT_SAPLMRMP_010 that called after clicking on save Button. how we can call the subscreen as a POPUP.

 

Regards.

Nishant

BD87 displaying all the idocs

$
0
0

Hi,

 

I found a strange issue with BD87,

When I copy and paste 999 idocs in BD87 and display those idocs, I can see 999 idocs.

When I copy and paste 1001 idocs in BD87 and display those idocs, I can see 1001 idocs.

But when I copy and paste 1000 idocs in BD87, it is displaying all the idocs in the system.

 

Did anyone faced a similar issue?

 

Regards,

Laxman

Viewing all 1442 articles
Browse latest View live


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