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

Debugging F110 for User-Exit.

$
0
0

Hello all,

 

I have developed a custom report which sends E-mails to all the vendors. This report should be triggered whenever the payment is run. I tried to debug for USER EXIT but i m unable to trigger any break point in F110 payment run as it is background processing. Also this report should be triggered for all the payment types listed below. Can you please help me find any common USER-EXIT which can fulfill the requirement.

 

1. Payment type X – Tax ACH Transfer in CCD+ Format

2. Payment type T - ACH Transfer in CTX Format

3. Payment type A - ACH transfer in CTX Format

4. Payment type S - Leasing ACH Trans CTX Format

5. Payment type R – PetsCard ACH Trans CTX Format

6. Payment type C – check

7. Payment type K – outsource check

8. Payment type B – Epayables

9. Payment type U

10. Payment type E


How to validate USER EXIT in debugging mode ?


Any input on how to approach this is greatly appreciated.


Thanks in advance.


USEREXIT in transaction F110 to Trigger

$
0
0

Hello ABAP experts,

 

I have developed a custom report which generates email to all the vendors who has deductions. This report should be triggered whenever payment is run. I tried debugging the F110 transaction and i didn't find any user exit to place logic to trigger the report. This report should be triggered for all the payment types listed below.  Can you please help me find any common USER-EXIT for all the payment types ?

 

1. Payment type X – Tax ACH Transfer in CCD+ Format

2. Payment type T - ACH Transfer in CTX Format

3. Payment type A - ACH transfer in CTX Format

4. Payment type S - Leasing ACH Trans CTX Format

5. Payment type R – PetsCard ACH Trans CTX Format

6. Payment type C – check

7. Payment type K – outsource check

8. Payment type B – Epayables

9. Payment type U

10. Payment type E



Any input on how to deal with this will be greatly appreciated.


Thanks in advance.

Creating and using elements in Sapscript

$
0
0

Hi,

I am updating a copy of standard form MR_PRINT and in the info box I need to include data that is going to have multiple rows. I would like to know how i can create a element and call it to return the data. I was thinking about using a perform but do not believe that a perform can call an element. Please let me know if this is also correct.

Thanks,

Jim

2 loop in smartform

$
0
0

Hi experts,

 

I have the following issue: I have to print 2 tables in a smartform (see image attached please, table "devengos" and "descuentos").

In the main program I have 2 internal table with the required information. If the entries of both records aren't less than X (I think it's 19 for the first table and 12 for the other) it works fine. The problem is when there are more entries in any of the tables. In that case I need to print those entries in another page.

At first, I didn't use the MAIN window but I think it's necessary. So, I create 2 different loops in the MAIN window controlling the number of entries. But when it goes to the second page it doesn't print the data correctly. Entries from table2 are printed in "Devengos" and entries from table1 are not printed.

Any suggestion please ? How can I do that ? Should I use only an internal table with all the data mixed?

 

Thanks in advance,

 

María

Header shipping instructions paragraph issue

$
0
0

Hi ,

 

   I have to print the shipping instructions in sales order to invoice. In header shipping instructions contains two paragraphs. But when I am passing this to invoice it is printing first paragraph###Second Paragraph. I mean at the end of first paragraph text it is printing ### and then second paragraph in same line ..

 

Ex: We are working in SAPABAP.(First paragraph) 

Discussion on shipping instructions(Second paragraph)

 

Now it is displaying as We are working in ABAP###Discussion on shipping instructions.

 

I want this in two paragraphs. Can anyone help me?

SELECT SINGLE vs. SELECT UP TO 1 ROWS

$
0
0

Some time ago I´ve written a small block Selecting One Row From a Database Table in order to explain the usage of SELECT SINGLE and SELECT UP TO 1 ROWS. Obviously, there are still discussions about this. OK, let´s derive some rules based on my previous blog:

 

TASK: You want to select one row with a fully specified key into a tabular result

 

You need neither SINGLE nor UP TO 1 ROWS:

 

SELECT ...

       FROM dbtab

       WHERE full_key

       INTO TABLE itab.

 

or

 

SELECT ...

       FROM dbtab

       WHERE full_key

       INTO wa.

  ...

ENDSELECT.

 

The result is tabular containing one line.

 

TASK: You want to select one row with a fully specified key into a structure

 

You use SINGLE:


SELECT SINGLE ...

       FROM dbtab

       WHERE full_key

       INTO wa.


The result is a single line. You use SINGLE to prevent a tabular result.


TASK: You want to select one row with a partly specified key

 

You use UP TO 1 ROWS:


SELECT ...

       FROM dbtab

       WHERE part_key

       ORDER BY ...

       INTO TABLE itab

       UP TO 1 ROWS.


or

 

SELECT ...

       FROM dbtab

       WHERE part_key

       ORDER BY ...

       INTO wa

       UP TO 1 ROWS.

  ...

ENDSELECT.


The result is tabular and the usage of ORDER BY is recommended. Usage of SINGLE is not appropriate here.

 

TASK: You want to check the existence of a row

 

You use SINGLE:


SELECT SINGLE col

       FROM dbtab

       WHERE any_key

       INTO (field)

       ##warn_ok.

IF sy-subrc = 0.

   ...

ENDIF.

 

The result is a single data object. There is no need for a tabular result and the usage of ORDER BY. From 7.40, SP05 on, you can even specify a literal ´X´ or a constant for col in order to prevent any data transport from DB to ABAP.

 

If you or your Q-Manager don´t like the ##warn_ok, you can also use:

 

SELECT col

       FROM dbtab

       WHERE any_key

       INTO TABLE itab

       UP TO 1 ROWS.

IF sy-subrc = 0.

   ...

ENDIF.


Practically there is no difference in performance.

 

 

 

 

The paper is open for discussion.

SELECT SINGLE VS SELECT UP TO 1 ROWS

$
0
0

By seeing the Heading (select single vs select up to 1 rows) many of you might suggest me to search the forum. I did search the forum and found few threads regarding the differences but I'm confused with the fact that in few threads it says SELECT UP TO 1 ROWS is faster which is marked as right answer(select single vs select upto one row | SCN) and in few threads it says performance wise there is no difference ( "SELECT SINGLE" vs. "SELECT UP TO 1 ROWS" | SCN ).

 

Which is right?

Getting Error While using WRITE TO STATEMENT

$
0
0

Hi Everyone,

 

I am facing an issue when ever i am writing a WRITE TO statement. my requirement is as follows.

 

 

 

4563 JPY will be stored in the database table BSEG as 45.63. But when this values is displayed on the screen (like FB03), system will internally convert back and display 4,563 JPY.  in one of my subroutine of the program while populating the output amount value(WRBTR) is being fetched from BSEG table and moved to output internal table based on currency(PSWSL).

 

WRITE wa_bseg-wrbtr TO wa_output-amount CURRENCY wa_bseg=pswsl.

 

the WRITE TO statement with CURRENCY is being written so that the system will internally convert back and shown in proper format in FB03.

 

after PPV reclassification, the amount 324 JPY is posted as 3 under one GL account. I need to implement the same WRITE TO CURRENCY to display in proper format. i tried to write in as follow.

 

WRITE wa_bseg-wrbtr TO wa_currentamount-amt_doccur CURRENCY wa_bseg-pswsl.

 

 

but it is throwing an error saying amt_doccur should be of type I,C,N

 

 

details of field amt_doccur(data type : DEC, no of char: 23, decimal:4, total length: 30) where as details of field wa_bseg-wrbtr is (data type: CURR, no of char:13, decimal : 2 total length : 16). how to avoid this error. or is there any function module which can convert the data type from CURR to DEC.

 

 

Kindly suggest some solution.

 

Thanks & Regards

PRN


Enhance ME23N Transaction to Enable Drill Down to Purchase Order Item

$
0
0

        Whenever you program ABAP reports displaying Purchase Order Items data it is nice to have drill down functionality to transaction data (trx. ME23N). It looks like a trivial task (setting Parameter IDs for Purchase Order / Item and Call Transaction), but in reality ME23N transaction is not using Parameter IDs as we expect. In my blog I will explain how to enhance ME23N to make drill down work.

          What is takes is to enhance INIT_TRANSACTION form in RM_MEPO_GUIF01 adding some code to end of the form implicit enhancement point.

ME23N 1.jpg

    So now if I jump from my report setting BES and BSP Parameter IDs everything will work like a charm

ME23N 2.jpg

Try attached Z_ME23N_DRILL_DOWN report

ME23N 3.jpg

ME23N 4.jpg

Save Button on Alv report output toolbar

$
0
0

Hi ,

 

I have one requirement to delete or block vendor from alv output list so for that if user select checkbox and click on save button that vendor should be deleted .

but i am not getting how to add save button i want to use standard .

please reply asap.

Entry in outbound table not found E0 400

$
0
0

Hi all,

 

 

    Can anyone please help me with the below error which i am facing in ALE IDOCS.

 

status 29: Entry in outbound table not found E0 400

 

I am unable to see my port name in the created IDOC and the basic type is incorrectly called.

 

may I know what settings need to be verified.

 

Thanks in advance.

Getting Print Preview Of Smartform First and then Save PDF file in local PC

$
0
0

Hi,

 

Can anyone help in getting Print preview of smartform first and then  save smartform as PDF file in local  PC.  I am getting PDF file directly but  user wants to preview first and then convert into  PDF.

 

Regards,

ujjwal kumar

code written after leave to screen nnn

$
0
0

hi

this is not leave to screen 0, this is leave to screen <screen number>

suppose I have some code written after this leave to screen number statement.

as per my analysis, there  is no way to get control execute the code written below leave to screen number.

I have tried different things

remove the next screen attribute from the called screen

save calling screen number in global variable and write leave to screen number of previous screen

because then it calls the PBO of that screen and go directly to the code after leave to screen no statement

if I use call screen statement then I can get back to code written after call screen

but I need to kind of replace all the call screen statements with leave to screen statements in a rather big module pool

this is to avoid the dump of more than 50 nested screens

 

 

thanks

bhakti

Adding new field in GLU1, require to add in GB01 also?

$
0
0

Hello Experts,

 

We have a requirement and to meet that, we have to add a new field in GLU1 table structure. Idea is to add it in transaction table without adding it in summary table.

While the program makes Finance posting, it calls GB01 Tcode to make posting and stores data in SPL table.

 

Now, the question is: do we need to necessarily add a new field in GB01 front end and map it to new field in table, in order to make posting and update value in new field?

 

We dont see any screen exit provided to add new field in GB01.

Pointers/ guidance in this regards would be much appreciated!

 

 

 

Best regards,

Karan

Simple Transformation for Sharepoint WSDL GetListItems

$
0
0

Hi

I'm able to read from ABAP a SharePoint List by using the SharePoint Webservice. For this I created a Enterprise Webservice. So far so good.

 

When I use the WebService Method Get_List_Items.with this XML

  <n0:GetListItems xmlns:n0="http://schemas.microsoft.com/sharepoint/soap/">
  <n0:listName>{67D38E2A-647D-4976-B989-BD8B2E131DDC}</n0:listName>

</n0:GetListItems>



I'm getting also a result:

<?xml version="1.0"?>

<n0:GetListItemsResponse xmlns:n0="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><n0:GetListItemsResult xmlns:z="#RowsetSchema" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"><n0:listitems><rs:data ItemCount="8"><z:row ows_LinkTitle="1337" ows_Plant="10" ows_MetaInfo="1;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="1337" ows_ID="1" ows_UniqueId="1;#{05F8EDB7-D0CA-4024-8125-AC3628394B69}" ows_owshiddenversion="5" ows_FSObjType="1;#0" ows_Created_x0020_Date="1;#2016-02-16 14:20:31" ows_Created="2016-02-16 14:20:31" ows_FileLeafRef="1;#1_.000" ows_PermMask="0x7fffffffffffffff" ows_Modified="2016-05-27 23:18:38" ows_FileRef="1;#Lists/Testlist/1_.000"/></rs:data></n0:listitems></n0:GetListItemsResult></n0:GetListItemsResponse>



In my ABAP I try to read the XML using simple transformation, but don't have a clue how this simple transformation should look like.

Does anybody has an example used with a SharePoint Webservice Method?


Or could anybody tell me how the ST should look like?


Any response is welcome

Thx

Roger


How to generate custom routine for program SAPFV60C in QAS (non-modifiable)

$
0
0

Hi ABAP Experts,

 

I have copied an standard routine 003 "Single Invoice" in VTFL to a custom routine 902 "NZ EDI Single Inv" to create one invoice per one reference document (delivery) for only sales org NZE0 as below.

 

In DEV, it was successfully generated for program SAPFV60C with message "Program SAPFV60C successfully generated".

 

After  moving the routine to QAS (non-modifiable system), VF04 cannot execute because the routine does not exist.

 

Could you please advise what else I should do to resolve the issue ?

 

Capture7.PNG

 

 

Capture5.PNG

 

Capture6.PNG

 

 

Thanks and regards,

 

Danny

Defaulting a value of a column while using CORRESPONDING#

$
0
0

Hi Experts,

 

    I am new to the new ABAP syntax and need to perform the following operation.

 

    Requirement  : it_item and et_item are tables which a slightly different.

                            a) it_item has ( key ....other fields )

                            b) et_item has ( mandt, db_key ... other fields)

 

                            I need to move contents from it_item to et_item while mapping the key from it_item into db_key of et_item.

                            At the same time, I need to fill the mandt field with a fixed value.

 

    Old syntax :

 

      In terms of performance this is slower than the new syntax.

 

      LOOP AT it_item ASSIGNING <ls_item>.


         APPEND INITIAL LINE TO et_item ASSIGNING <ls_item_db>.

         MOVE-CORRESPONDING <ls_item> TO <ls_item_db>.

         <ls_item_db>-db_key = <ls_item>-key.

         <ls_item_db>-mandt is_client-mandt.


       ENDLOOP.


  I replaced the old syntax with the new ABAP constructs.

 

    New syntax:


            et_item = CORRESPONDING #( it_chrg_item MAPPING db_key = key ).

            This works fine to map all fields except it cannot fill the mandt field.


            Is it possible to fill et_item with the mandt field simultaneously while using the new syntax ? 

         

            OR


           Is it possible to fill all contents of et_item with mandt with the new ABAP constructs , I do not want to loop over all et_item contents ?

  





  

Send idoc ORDRSP depending on the supplier

$
0
0

Hello all,

 

When a sales order is created (VA01) and saved, an idoc message type ORDRSP basic type ORDERS05 is sent. I would like that this idoc will be sent depending on the supplier code.


My problem is that I don’t know if that would be done by customizing or if I should modify some USER EXIT.

I looked for the customizing option but I found nothing. I tried to do it by code but I did not found the USER EXIT that sends ORDRSP/ORDERS05.

 

Could you kindly help me?

 

Thanks in advance.

Best regards.


Ángel

Issue with calling a form from SAP original function module

$
0
0

Hi,

 

probably my skills are too poor for that.

 

I implemented an OSS which added some code into the function module BG_GIVE_MESSAGE used in module PS.

The OSS is to optimize availability check.

 

It adds a perform call to a subroutine pool named ZBPFCFYR that I had to create as well.

 

No issues so far when  I added the code here that SAP gave as an example. But the example does not fulfill my needs.

As I need to do a select there based on a parameter that is not handled when calling the form in there.

 

 

This is how I filled the subroutine. Have a look at the parameters.

 

   FORM avc_get_from_year

     USING value(i_periv) TYPE periv

                 value( i_profil) TYPE BP_PROFIL     (*** This is a parameter that I added to the code generated by SAP)

    CHANGING e_from_year  TYPE gjahr.

                                    

 

And this is how the code looks that SAP added from the OSS in the BP_GIVE_MESSAGE where I need to change code as well due to my

new  using-parameter i_profil.

 

perform avc_get_from_year

   in program zbpfcfyr if found

    using para-periv

*( Insert

              i_bprof

*) Insert

  changing  sd_from_gjahr.

 

 

No issue till I try to activate my change in BP_GIVE_MESSSAGE.

 

 

The error coming up is

 

INCLUDE LBPFCFD1

Parameter error at perform avc_get_from_year(zbpfcfyr).

Number of parameters (2) does not correspond to the number of parameters for the first use of this form (3).

 

Can anybody help with that?

From my understanding there is no issue. The code in the sub routine pool is already activated w/o issues.

 

 

Best regards

Dirk

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Custom field's value not getting saved in the table.

$
0
0

Hi All,

 

I have extended MRP2 view of material master with one new custom field. The field is added to the screen and MARC append structure has also been updated. But while entering any value to the custom input field, it is not getting saved to MARC .Please suggest on this issue.

 

Thanks in advance,

Ruchika

Viewing all 8332 articles
Browse latest View live


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