Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

PR05,BDC CALL TRANSACTION RETURNING SUBRC 1001.

$
0
0

Hi experts,

 

i have requirement where in my alv result screen there exists a trip number field , if i click on it should show the trip details from standard transaction PR05.

 

Set parameter doesnt work because in PR05 first we need to enter employee number then press enter . it will show all the trips of the employee in table control. now select the desired trip and click display, the screen which comes next is the one i want to get it from my alv.

 

For achieving it i have done recording and the code seems to work perfectly fine in ALL screens mode.but in NO screens mode the subrc of call transaction is returning 1001. in message sy-msgno i can see the message "no batch input for screen". i am not able to understand where i am going wrong or am i missing some thing. Please help me resolving this issue.

 

Also i there any more  possible alternative to this like FM ,bapi or service function which can directly show me that trip screen.

 

Thank you.

 

BR

shadab


Drilldown function from ALV list

$
0
0

Hello ABAP Friends,

 

I am producing an ALV list output with summarized costs from table COEP. I use a COLLECT statement to summarize costs that have been posted to a cost element. The ALV list shows a total amount which could be made up of several positive and negative amounts. For example, the ALV list could show a total of +21500 which could be made up of 3 amounts:

 

+35600

-36500

+21500

 

I need to be able to provide a way of breaking out the individual amounts that make up this total amount in the ALV list. For example having a button in the ALV list screen so that if a user highlights a cell in the ALV it can prsent a 2nd popup screen shoing the individual amounts beneath the total.

 

Can you how I might achieve this or something similar in an ALV list drilldown?

 

Thanks for any ideas.

Michael

FICO - FV60 PREM Search Help

$
0
0

Hi All,

Good day to you, We are using SAP ECC 6.0 EHP 7. Our customer requirement is that when document parked via FV60 T-code, We need F4 search help of Personal number in line item column. Search help is available but it is only showing two tabs that is Personal number and IC.  We want to search personal no. according to first name and last name in T-code FV60 which is not available.  Kindly give us your suggestions on same.

 

Below screenshot is showing for t-code FV60. As shown only 2 tabs are available.

FV60 PREM search help.jpg

In Below screenshot T-code FB50  4 tabs are available.

FB50 PREM search help.jpg

Which program generates SPOOL ID for PO Creation

$
0
0

Hi everyone,

 

I wish to send PO PDF through email at the time of creation after pressing save button..

 

I have done research on SCN but didn't got satisfactory solution.

 

Please guide me on this.

 

Thanks,

Darshan

How to write Dynamic Function Module

$
0
0

Hi All,

 

I have one requirement to dynamically create Remote enable function module.

 

I got one FM :  FUNCTION_CREATE.

 

It create Function module but there is no provision to write coding for FM.

 

Kindly suggest...

 

Thanks in Advance.

 

Regards

Vivek

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.

Getting Started with ABAP Development

$
0
0

This page is the central entry for the ABAP Development. It provides links to different information materials and ressources (such as guides, articles, blogs, and tutorials) regarding ABAP development in general.

 

Latest News :SAP NetWeaver 7.5 including AS ABAP 7.5 is generally available since October 20th, 2015.

                           Visit the AS ABAP 7.5 Landing Page.

 

ThreeDocs.png


Introduction to ABAP

 

 

 

sapnwabline.png

HelpDesk.png


Information channels

 

 

sapnwabline.png

Product.png


Trials

 

 

sapnwabline.png

Begin.png


SAP NetWeaver AS ABAP Releases


ProductCatalog.png

General Overview of SAP NetWeaver AS ABAP 7.5


                   

SAP NetWeaver Application Server for ABAP 7.5, is the underlying ABAP platform for SAP S/4HANA, on-premise edition, SAP Business Suite Enhancement Package 8 and SAP Business Warehouse 7.5.


 


Product.png

Support Package 00

Generally available since October 20, 2015

 

 


 

ProductCatalog.png


General Overview of SAP NetWeaver AS ABAP 7.4

 

Innovate and accelerate your business

Build real-time applications using SAP NetWeaver AS ABAP powered by SAP HANA

 


 


Product.png

Support Package 08

Generally available since September 15, 2014

 


Product.png

Support Package 05

Generally available since December 20, 2013

 


Product.png

Support Package 02

Generally available since May 20, 2013

 

Error while creating invoice type WIA from delivery.

$
0
0

Hi All,

I am trying to create an invoice with type WIA (Plants Abroad) type for the delivery. But I am getting Below error.

"The document is not relevant for billing".  While debugging we found that the Billing Status(FKSTK) for delivery in VBUK is blank.

 

Please let me know what we are missing here OR Is there any BADI to handle this scenario.


Deleting special characters from Integer data type

$
0
0

Hi Experts,

 

I have field type integer.

I wanted to delete special character from that data type or comma from data type.

 

Example :

it is coming as 1,000  But I need the value as 1000. I want to remove that comma .

Can you please suggest me how can i acheive it ?

SAP NetWeaver AS for ABAP 7.5 - One ABAP Platform for SAP Business Suite and SAP S/4HANA, on-premise edition

$
0
0

This is the landing page for SAP NetWeaver Application Server for ABAP 7.5, which is the underlying ABAP platform for SAP S/4HANA, on-premise edition, SAP Business Suite Enhancement Package 8 and SAP Business Warehouse 7.5.

 

abap750.png

 

                    • Compatible successor of SAP NetWeaver AS ABAP 7.4
                    • Innovation without disruption: Big Data, SAP HANA, Industrie 4.0, SAP Fiori and Cloud
                    • Runs on innovation kernel 7.45
                    • Supports SAP HANA and other classical databases
                    • Unicode systems support only

 

 

This document will be regularly updated. Follow it to be notified about the latest SAP NetWeaver AS ABAP 7.5 news.


News

 



SAP NetWeaver AS ABAP 7.5

 

Today with more then 41.000 productive ERP customer systems and 4,5 milllion registered ABAP developers, SAP NetWeaver AS ABAP is and continues to be the key technology platform for majority of enterprise-ready SAP business solutions.


With SAP NetWeaver AS ABAP 7.5, the main ABAP platform assets such as rock solid and scalable server for mission critical business systems, effective programming environment for the complete life cycle of business applications were strengthened and extended to serve new and evolving business and technology trends - such as Big Data, Mobile and Social, Internet of Things and Cloud - and growing customer expectations like best user experience, extensibility, safeguard and innovate SAP Business Suite, connect everything and new business models.


To meet the needs of next generation SAP Business Suite - SAP S/4HANA, cloud and on-premise editions, the ABAP platform was transformed and enhanced with regards to easy-to-exploit SAP HANA as the underlying platform, simplified and standardized data model compatible to the classic ERP and cross-application user experience with SAP Fiori as UX paradigm.


SAP NetWeaver AS ABAP 7.5 facilitates Industrie 4.0 scenarios by enabling direct communication with sensors and machines through native TCP/IP support in ABAP using ABAP Channels. SAP NetWeaver AS ABAP 7.5 further evolves in the way to exploit SAP HANA in productive applications by offering new advanced Core Data Services(CDS) and Open SQL features such as table functions (seamless integration of CDS and AMDP), new SQL functions and consumption of associations in query.


SAP NetWeaver AS ABAP 7.5 enables the easy development of new role-based SAP Fiori applications by offering an effective programming model based on the new application infrastructure:

 

  • Best user experience with SAP Fiori
  • One harmonized data model with ABAP CDS
  • Data to UI with OData service
  • ALV like HANA optimized services for analytic apps with SADL
  • Transaction, error and event handling services with BOPF
  • End-to-end development tools in Eclipse

 

SAP NetWeaver AS ABAP 7.5 further modernizes and simplifies ABAP language, contributes to first class developer experience in Eclipse, keeps up advanced quality assurance and provides new custom code management tools for the migration to SAP S/4HANA.

 



Highlights

 

hana.jpg


ABAP application development further optimized for SAP HANA (Learn more)

lang75.png


New ABAP language features for more simple and concise code (Learn more)

eclipse75.png


Increased developer efficiency in Eclipse

fiori75.png


Efficient programming model for SAPFioriapplications

sql75.png


Increased coverage of SQL standard

industry4075.png


Industrie 4.0 and big data scenarios support

tool75.png


Tool support for migration to SAP S/4HANA

 



Further Information

 

ABAP for SAP HANA News in SAP NetWeaver 7.5

ABAP News for Release 7.50 - What is ABAP 7.50?

ABAP News for Release 7.50 - CDS Table Functions implemented by AMDP

ABAP News for Release 7.50 - IS INSTANCE OF

'RECEIVED' confirmation message

$
0
0

Hello All,

 

I have already send a mail with Z code ...

(using send call method )

 

But we need 'RECEIVED' confirmation message ...

What can I do ?

 

What do you recommend me ?

 

Regards

Tanju

Create_Text

$
0
0

Hi experts,

 

am Using the function module "Create_text" to create the some standard text in the TCode  "SO10" but its falling to create . also am using the commit function to it.

 

note : while debugging i found that internal commit is available for this FM but still am using external commit FM still its falling.

 

If i run the same FM in se37 itself by giving the same data it is creating the STD text on the above tcode but failing to create inside the program.

 

below i attached the sample code with the FM "Create_text" please take a look and let me know where am doin the mistake...

 

{Code}

 

DATA: lt_string TYPE STANDARD TABLE OF tline.

DATA: lv_comit TYPE sy-index.

 

CALL FUNCTION 'CREATE_TEXT'

   EXPORTING

     fid         = 'ST'

     flanguage   = 'E'

     fname       = 'ZTES'

     fobject     = 'TEXT'

     save_direct = 'X'

     fformat     = '*'

   TABLES

     flines      = lt_string.

 

IF sy-subrc = 0.

   WRITE: ' FM sucessful'.

ELSE.

   WRITE: 'FM error'.

ENDIF.

 

CALL FUNCTION 'COMMIT_TEXT'

   EXPORTING

     object          = 'TEXT'

     name            = 'ZTES'

     id              = 'ST'

     language        = 'E'

     savemode_direct = 'X'

     keep            = 'X'

*   LOCAL_CAT       = ' '

   IMPORTING

     commit_count    = lv_comit.

*       TABLES

*         T_OBJECT              =

*         T_NAME                =

*         T_ID                  =

*         T_LANGUAGE            =

.

 

IF sy-subrc = 0.

   WRITE: / lv_comit.

ELSE.

   WRITE: 'commit error'.

* Implement suitable error handling here

ENDIF.

{code}

 

 

 

 

for the above code is not returning any error. but also its giving lv_comit = 0. means nothing is got commited

 

pleaselet me know where am doing the mistake.

Replacement of FM - MM_HISTORY_POPUP_SHOW

$
0
0

Hi People,

 

System is saying that the FM - MM_HISTORY_POPUP_SHOW is obsolete now.

 

Can you please tell me the replacement of this function module...?

 

Thanks in advance...

 

Regards,

Deshpande Ketan

Project User status update

$
0
0

Hello experts - I am using the following BAPI's inorder to update the project user status.

 

 

 

CALL FUNCTION 'BAPI_PS_INITIALIZATION'.

CALL FUNCTION 'BAPI_BUS2001_SET_STATUS'

CALL FUNCTION 'BAPI_PS_PRECOMMIT'

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

 

 

I am getting subrc 0 after execution of CALL FUNCTION 'BAPI_BUS2001_SET_STATUS' , But getting a dump in BAPI_PS_PRECOMMIT .

 

From ST22 , I could see the pointer is on the redline .

 

 

 

The termination occurred in ABAP program "SAPLPS_BAPI", in "CHK_PRECOMMIT".The main program was "RS_TESTFRAME_CALL".

 

FORM chk_precommit.

  DATA: chk_precommit_ok TYPE c,
        chk_error        type c.

  CALL FUNCTION 'PS_FLAG_GET_GLOBAL_FLAGS'
       IMPORTING
            e_precommit_ok = chk_precommit_ok
            e_error        = chk_error.

  IF chk_precommit_ok = space.
*   Precommit wurde noch nicht aufgerufen.
    MESSAGE x030(cnif_pi).
ELSEIF chk_precommit_ok <> 'Y'.
*   Precommit wurde nicht erfolgreich durchlaufen.
    MESSAGE x033(cnif_pi).
  elseif not chk_error is initial.
*   At least one single BAPI failed
    MESSAGE x056(cnif_pi).
  ENDIF.

 

Any idea on how to get rid of this ?

 

Thanks,

Arun.

 

Serial number is not copying to Repair service order when it is created from notification?

$
0
0

Hello All,

 

When we are creating a Repair service order from Service Notification(IW52) the Serial number is not getting copied into Repair service order. is there any exit/Enhancement available to copy this field?

 

here is the serial number field in Notification. that should be copied in to repair order.

 

Iw52 serial number.png

Repair order is created from notification.

 

Serial number in Va02_1.png

Serial number in Va02.png

 

Thank you in advance.

 

 

Regards,

Ramesh


can not assign to transport task. Urgent , thanks!!!

$
0
0

Dear Experts,

 

i am facing a critical issue.

At the moment, after changing e.g. a report I can not use the existing transport request ( task ) , and get the message : You can not use the request xxxx.

 

The background is, we changed the orginal system in SE03 for this package (to which the program is assigned).

 

It seems we also need to change the transport layer of this package to the system default layer, Is it true that I should use the layer I found in in STMS ( transport route ) ?

 

And in SE03 , as i tried to change the layer of this package. I was asked again of creating a new transport request, because there is no request to choose.

 

Thus i would like to ask, what I should do to make this transport layer correct, and my target is , that changes in programm can be assigned to the correct transport request / task.

 

Thanks a lot.

 

PS: If any pics or screenshots needed, just post, I am waiting online.

Replacement of FM - S_WAP_USER_PASSWORD_RESET

$
0
0

Hi People,

 

In SAP system SAP ERP 6.0 EHP7 SP Stack 9 i am not able to find the FM - S_WAP_USER_PASSWORD_RESET.

 

Is it obsolete ??

 

What is the replacement for this FM in new system ?

 

Thanks in advance.

 

Regards,

Deshapande Ketan

Multiple Selection-Screens

$
0
0

Hi


I have a scenario where i need to have three selection-screens.

 

When we execute the program the first selection-screen should be displayed with 2 radio buttons.

 

When 1st radiobutton is selected, it has to take us to 2nd selection-screen on this this screen we want user defined data.

When 2nd radiobutton is selected, it has to take us to 3rd selection-screen this is also filled by user , we have to create select options on both 2nd and 3rd screen.

 

I tried some code using loop at screen.  but it dint work.

 

Can anyone suggest any solution that how can we add screen through a report via radiobutton.

 

Thanks in Advance,

Regards

Abhishek

MD04-Requirement Quantity

$
0
0

Business require logic of requirement quantity of structured header material should be calculate on the basis of its component highest requirement quantity

For this, we have implemented BADI_DECISION & we maintained logic in EXIT_SAPLWSOS_001.

We are able to display the component highest component quantity , but the requirement elements are not getting displayed after we implement the user exit .

Any suggestions  on how to update the component highest requirement  quantity  of structured header material.

Any Reusable ideas in ABAP Development?

$
0
0

Hi Experts,

 

Can anyone provide any reusable ideas, that can be implemented in ABAP development (Eg: Reports, FM's)

 

So that they can be reused directly in different projects which saves our time.

 

Thanks in advance.

Viewing all 8332 articles
Browse latest View live


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