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

Creating PO (ME21N) PO and Asset number should be same

$
0
0

Hi team,

REQUIREMENT  - when we create PO the material which we enter should be same as ASSET like

If material is 123456 then ASSET in TAB -(Account Assignment) should be same or else it should give Error.

Is there any Enhancement or any BADI where we can write code for the same .

 

Please help

 

Thanks and Regards,

 

Prasad Krishna Naralkar


Adding an existing search help to new ztable

$
0
0

Hi expert,

 

I have created new ztable and I want to assign one F4 help in region code which is already exist in other domain under region code.

 

So I am using the same but its not working.

 

Can you just help me out with this.

 

Regards
Swapnil

Workflow authorization check

$
0
0

Hi Experts,

 

I have searched the forum for this but, could not find the approach to be used.

 

We have a requirement to make few Standard tasks and Workflow templates obsolete.

So, we want add dummy authorization check here for these objects.

Can you please let me know the steps to apply this dummy check in these objects

 

Thanks

Janakiram

Example of BADI_SORTER

$
0
0

Hi ABAPers,

 

Can anyone please give me the detailed example of use BADI_SORTER.
I have gone through many posts and links related to this, and somewhat understands the concept of how to use it using screen inorder to control the implimentations forr BADI, but still I am not that much clear about it. A small example with steps might be helpful in this regards.

 

 

Thanks,
Salil B

Disable back button of fv11 tcode .

$
0
0

Hi,

I am using fv11 BDC to update the records . we have multiple key combinations for each condition type, so I am directly giving item screen to user through bdc recording to enter the values manually. In some cases user clicked on back button it is going to initial screen of fv11. here user can select any other key combination so we need to avoid that so is it possible to disable back button ???? bcz if user select cancel button it is leaving the program.

 

 

thanks,

Mohan.

Update delivery quantity after delete HU from Inbound delivery

$
0
0

Hi Expert,

 

Kindly, need your help regarding below issue:

 

I have been using this  BAPI_HU_DELETE_FROM_DEL to delete HU. The HU was successfully deleted but the delivery quantity does not updated, I already debug but cannot the root cause.

 

Please advise,

 

Thanks and regards,

Liyana

Save and get variant using dialog program

$
0
0

Hi All,

 

Kindly need your advise regarding save variant and load variant in dialog program. I have searched for the procedure to create variant, unfortunately, found that to create variant in module pool still need the selection screen which differ from my program requirement. I have a modal pool program as below:

Capture.PNG

 

and i want to save variants for check box and file path, is that possible to create it in modal pool program?

 

Your advise is really appreciated,

 

Regards,

Liyana

Error: WA cannot be converted to the line type of Internal table

$
0
0

Hello I have been working on a simple ALV Grid Program.

But to my surprise,I have been getting an error
"WA_FCAT CANNOT BE CONVERTED TO THE LINE TYPE OF IT_FCAT"

 

Here is the Code:

 

*&---------------------------------------------------------------------*

*& Report  ZALV_REPORT                                                 *

*&                                                                     *

*&---------------------------------------------------------------------*

*&                                                                     *

*&                                                                     *

*&---------------------------------------------------------------------*

 

 

INCLUDE ZALV_REPORT_TOP                         .    " global Data

 

 

* INCLUDE ZALV_REPORT_O01                         .  " PBO-Modules     *

* INCLUDE ZALV_REPORT_I01                         .  " PAI-Modules     *

INCLUDE ZALV_REPORT_F01                         .  " FORM-Routines   *

 

 

INITIALIZATION.

AT SELECTION-SCREEN.

START-OF-SELECTION.

perform f_get_data.

END-OF-SELECTION.

 

 

if not it_vbak is initial.

perform f_fieldcat_alv.

endif.

 

 

 

 

 

 

 

 

 

*&---------------------------------------------------------------------*

*& Include ZALV_REPORT_TOP                                   Report ZAL*

*&                                                                     *

*&---------------------------------------------------------------------*

 

 

REPORT   ZALV_REPORT.

type-pools: slis.

data: gs_vbak type vbak.

 

 

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

SELECT-OPTIONS: S_VBELN FOR GS_VBAK-VBELN.

 

 

SELECTION-SCREEN END OF BLOCK B1.

 

 

TYPES: begin of ty_vbak,

        VBELN  type VBELN_VA,

        ERDAT  type ERDAT,

        ERZET type  ERZET,

        ERNAM type  ERNAM,

        ANGDT  type ANGDT_V,

        BNDDT type BNDDT,

        AUDAT type AUDAT,

        VBTYP  type VBTYP,

        TRVOG type TRVOG,

        AUART  type AUART,

        AUGRU type AUGRU,

      end of ty_vbak.

 

 

DATA:  it_vbak type table of ty_vbak,

       wa_vbak type ty_vbak,

       it_fcat type standard table of slis_t_fieldcat_alv,

       wa_fcat type  slis_fieldcat_alv.

 

 

 

 

 

 

 

 

*&---------------------------------------------------------------------*

*&  Include           ZALV_REPORT_F01                                  *

*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*&      Form  f_get_data

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM f_get_data .

refresh : it_vbak.

clear   : it_vbak.

 

 

if not s_vbeln is initial.

SELECT VBELN

        ERDAT

        ERZET

        ERNAM

        ANGDT

        BNDDT

        AUDAT

        VBTYP

        TRVOG

        AUART

        AUGRU

        FROM VBAK INTO TABLE IT_VBAK

        WHERE VBELN IN S_VBELN.

 

 

ELSE.

SELECT VBELN

        ERDAT

        ERZET

        ERNAM

        ANGDT

        BNDDT

        AUDAT

        VBTYP

        TRVOG

        AUART

        AUGRU

        FROM VBAK INTO TABLE IT_VBAK

        UP TO 100 ROWS.

 

 

 

 

endif.

 

 

 

 

ENDFORM.                    " f_get_data

 

 

 

 

*&---------------------------------------------------------------------*

*&      Form  f_fieldcat_alv

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM f_fieldcat_alv .

 

 

refresh: it_fcat.

clear: wa_fcat.

 

 

wa_fcat-row_pos  = '1'.

wa_fcat-col_pos  = '1'.

wa_fcat-fieldname = 'VBELN'.

wa_fcat-tabname  = 'it_fcat'.

wa_fcat-seltext_m = 'Sales Order'.

append  wa_fcat to it_fcat.

clear : wa_fcat.

 

 

 

 

 

 

 

 

 

 

ENDFORM.                    " f_fieldcat_alv

 

 

 

 

 

 

 

 

 

 

I tried checking everything in data declaration but I did not find any fault..

I Do not know what is wrong with the code.

Please help.Thank you in advance.


How to solve a TIME_OUT error in the program?

$
0
0

Hi Experts,

 

I am try to fix a Time limit exceeded error in the custom program, after review this program, I found there is a subroutine will be performed many times. And there are 3 standard FM  COM_PCAT_CTY_GETITEMLIST_O, COM_PCAT_ITM_GETDETAIL_O and  COM_PRSHTEXT_READ_SINGLE in this subroutine. A lot of SAP SQL & DB open/fetch in these 3 FM, so it will cost a lot of running time. The logic is ok, the requirement need to perform many times subroutine. Currently this program always dump when screen select a big Catalog Name.(Dialog mode & job mode) I think maybe use Parallel Processing call FM staring new task to solve this question,  but basis told me that the parameter of Max. Requests in Queue can't be changed(default is 5) I am afraid it's not enough for my requirement. Is there another way to solve this problem? I hope someone can give me a hint. Thanks!

 

Regards.

How to retrieve deleted or archived jobs

$
0
0

Experts,

 

I am facing one issue , Here in my system I can check log of last one month only for batch jobs in SM37.

I checked with basis team , they told me that jobs are deleted or archived from system which are more than one month old.

 

I checked different tables like TBTCO, TBTCP etc, All tables have information for last one month only.

 

I want to know is there any process to retrieve these jobs?

 

Need your expert solutions.

 

Thanks in Advance.

enable checkbox on alv output

$
0
0

hi

i have displayed one column as checkbox on my alv output.

i have created a hotspot for that to capture the row selected.but how can i enable i.e. make checkbox 'X' based on selection.

i have passed the layout value for the checkbox field name as well but unable to get the value checked when it is selected.

 

searched sdn for inputs but couldnt find solution for this

cheers

ERROR IN BAPI Purchase order still contains faulty items

$
0
0

Hello Expert,

 

Please help I try to upload service Po from  BAPI_PO_CREATE1 but I an getting error  .

 

Purchase order still contains faulty items

 

 

Please see below code what I am passing .

 

lt_itab_ven[] = lt_itab[].

 

**  SORT lt_itab BY vendor.

**  DELETE ADJACENT DUPLICATES FROM lt_itab COMPARING vendor .

 

   SORT lt_itab BY vendor collect_no.

   DELETE ADJACENT DUPLICATES FROM lt_itab COMPARING vendor collect_no .

 

 

   CLEAR:   g_bapimepoheader,g_bapimepoitem,g_bapimeposchedule,g_poitemx.

   REFRESH: g_bapimepoheader,g_bapimepoitem,g_bapimeposchedule,g_poitemx.

 

   LOOP AT lt_itab INTO ls_itab.

 

     MOVE-CORRESPONDING ls_itab TO g_bapimepoheader.

 

     w_type = ls_itab-doc_type.

 

     CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

       EXPORTING

         input  = ls_itab-vendor

       IMPORTING

         output = ls_itab-vendor.

 

     g_bapimepoheader-vendor     = ls_itab-vendor.

     g_bapimepoheader-creat_date = sy-datum.

     g_bapimepoheader-created_by = sy-uname.

     APPEND  g_bapimepoheader.

 

 

     g_bapimepoheaderx-doc_type    = 'X'.

     g_bapimepoheaderx-vendor      = 'X'.

     g_bapimepoheaderx-doc_date    = 'X'.

     g_bapimepoheaderx-purch_org   = 'X'.

     g_bapimepoheaderx-pur_group   = 'X'.

     g_bapimepoheaderx-comp_code   = 'X'.

     g_bapimepoheaderx-collect_no  = 'X'.

     APPEND  g_bapimepoheaderx.

 

 

     CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

       EXPORTING

         input  = ls_itab-vendor

       IMPORTING

         output = ls_itab-vendor.

 

 

     lt_itab_lin[] = lt_itab_ven[].

     SORT lt_itab_lin BY vendor.

     DELETE lt_itab_lin WHERE vendor <> ls_itab-vendor.

 

     lt_itab_serv_lin[] = lt_itab_lin[].

*    SORT lt_itab_lin BY short_text.

*    DELETE ADJACENT DUPLICATES FROM lt_itab_lin COMPARING short_text.

 

**    SORT lt_itab_lin BY short_text.

**    DELETE ADJACENT DUPLICATES FROM lt_itab_lin COMPARING short_text.

 

     pkgno = 0.

     LOOP AT lt_itab_lin INTO ls_itab_lin WHERE collect_no = ls_itab-collect_no .

 

       pkgno = pkgno + 1.

       MOVE-CORRESPONDING ls_itab_lin TO g_bapimepoitem.

       g_bapimepoitem-pckg_no = pkgno.

 

       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

         EXPORTING

           input  = ls_itab_lin-po_item

         IMPORTING

           output = ls_itab_lin-po_item.

       g_bapimepoitem-tax_code = ls_itab_lin-tax_code.    "TAX_CODE

       g_bapimepoitem-po_item  = ls_itab_lin-po_item.

       g_bapimepoitem-quantity = 1.

       APPEND g_bapimepoitem.

       CLEAR  g_bapimepoitem.

 

       MOVE-CORRESPONDING ls_itab_lin TO g_bapimeposchedule.

       g_bapimeposchedule-po_item     = ls_itab_lin-po_item.

       g_bapimeposchedule-quantity    = 1.

       g_bapimeposchedule-sched_line  = 1.

       APPEND  g_bapimeposchedule.

       CLEAR   g_bapimeposchedule.

 

 

       g_poitemx-po_item     = ls_itab_lin-po_item.

       g_poitemx-po_itemx    = 'X'.

       g_poitemx-acctasscat  = 'X'.

       g_poitemx-tax_code = 'X'.

       g_poitemx-item_cat    = 'X'.

       g_poitemx-short_text  = 'X'.

       g_poitemx-matl_group  = 'x'.

       g_poitemx-plant       = 'X'.

       g_poitemx-stge_loc    = 'X'.

       g_poitemx-net_price   = 'X'.

       g_poitemx-quantity    = 'X'.

       g_poitemx-po_unit     = 'X'.

       g_poitemx-orderpr_un  = 'X'.

       g_poitemx-trackingno  = 'X'.

       g_poitemx-delete_ind  = 'X'.

       g_poitemx-pckg_no     = 'X'.

       APPEND  g_poitemx.

       CLEAR   g_poitemx.

 

 

 

       g_poschedulex-po_item         = ls_itab_lin-po_item.

       g_poschedulex-sched_line      = 1.

       g_poschedulex-po_itemx        = 'X'.

       g_poschedulex-sched_linex     = 'X'.

       g_poschedulex-del_datcat_ext  = 'X'.

       g_poschedulex-delivery_date   = 'X'.

       g_poschedulex-quantity        = 'X'.

       g_poschedulex-deliv_time      = 'X'.

       g_poschedulex-stat_date       = 'X'.

       g_poschedulex-preq_no         = 'X'.

       g_poschedulex-preq_item       = 'X'.

       g_poschedulex-po_date         = 'X'.

       g_poschedulex-routesched      = 'X'.

       g_poschedulex-ms_date         = 'X'.

       APPEND  g_poschedulex.

       CLEAR   g_poschedulex.

 

       line_no = 0.

       line_no = line_no + 1.

       g_poservices-pckg_no       = pkgno.

       sub_pkgno = pkgno + 1.

       g_poservices-line_no       = line_no.

       g_poservices-subpckg_no    = sub_pkgno.

       g_poservices-outl_ind      = 'X'.

       g_poservices-quantity      = 1.

       APPEND g_poservices.

       CLEAR g_poservices.

 

       line_no = 0.

       LOOP AT lt_itab_serv_lin INTO ls_itab_serv_lin WHERE collect_no = ls_itab-collect_no .

 

         MOVE-CORRESPONDING ls_itab_serv_lin TO g_poservices.

         g_poservices-pckg_no       = sub_pkgno.

         line_no = line_no + 1.

         g_poservices-line_no       = line_no.

 

         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

           EXPORTING

             input  = g_poservices-service

           IMPORTING

             output = g_poservices-service.

 

         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

           EXPORTING

             input  = g_poservices-ext_line

           IMPORTING

             output = g_poservices-ext_line.

 

         APPEND g_poservices.

         CLEAR g_poservices.

 

         g_poaccount-po_item           = ls_itab_lin-po_item.

         g_poaccount-serial_no         = line_no.

         g_poaccount-wbs_element       = ls_itab_serv_lin-wbs_element.

         APPEND g_poaccount.

         CLEAR  g_poaccount.

 

         g_poaccountx-po_item           = ls_itab_lin-po_item.

         g_poaccountx-serial_no         = line_no.

         g_poaccountx-wbs_element       = 'X'.

         APPEND g_poaccountx.

         CLEAR  g_poaccountx.

 

         g_posrvaccessvalues-pckg_no    = sub_pkgno.

         g_posrvaccessvalues-line_no    = line_no.

         g_posrvaccessvalues-serno_line = '01'.

         g_posrvaccessvalues-serial_no  = line_no.

         g_posrvaccessvalues-quantity   = 1.

         APPEND g_posrvaccessvalues..

 

       ENDLOOP.

 

     ENDLOOP.

 

     CLEAR:g_ebeln,gstest.

*    REFRESH g_bapiret2.

 

 

 

     CLEAR: g_ebeln,g_expheader.

 

     CALL FUNCTION 'BAPI_PO_CREATE1'

       EXPORTING

         poheader          = g_bapimepoheader

         poheaderx         = g_bapimepoheaderx

         poexpimpheader    = g_bapieikp

         no_price_from_po  = 'X'

*       TESTRUN           = 'X'

       IMPORTING

         exppurchaseorder  = g_ebeln

         expheader         = g_expheader

       TABLES

         return            = g_bapiret2

         poitem            = g_bapimepoitem

         poitemx           = g_poitemx

         poschedule        = g_bapimeposchedule

         poschedulex       = g_poschedulex

         poaccount         = g_poaccount

         poaccountx        = g_poaccountx

         poservices        = g_poservices

         posrvaccessvalues = g_posrvaccessvalues.

 

 

     IF NOT g_ebeln IS INITIAL.

Tabstrip: Protected title for tab index

$
0
0

Hi all,

 

  This is the first time I am trying my hand on tabstrips so the problem may be elementary but I am unable to solve it. I've defined a tabstrip using the wizard with 6 tabs and when I run the program the tabstrip appears fine. But I also get a success message (00-119) 'Protected tab titles are not supported (tab & title &)'. And since this message is called dynamically, i cant determine the error cause. The tabs have name 'TABSTR01' to '06' and have been defined 'output fields' so no text(although i've tried with texts as well).

 

  could you please help me get rid of this message?

 

Thanks

cheers

Transporting Table entries

$
0
0

Hi,

 

I have a table which has three key fields of which one of the key field is a GUID field of data type CHAR 255.I have 500 records in this table. I need to transport the table contents to the next system (TST)

 

As per the below documentation, its not possible to transport the table contents as the length of the key fields is very large. I do not want to try transporting the contents generically as stated in the below document since one of the key field is a GUID.

 

Creating Tables -  ABAP Dictionary - SAP Library

 

Does anyone have an idea as to how I could keep the contents of this table same in both DEV and TST.

 

Thanks,

Murali

Unable to update HR Master Inbound idoc.

$
0
0

Hi All,

 

I am working on one req of Inbound idoc,HR module. The requirement is to create Activity type and update in PA0315 table which I am able to implement but there is one other requirement where I have to clear job group field data so that It can’t be seen in the idoc as it is a confidential data.

I have implemented my code in User exit ZXHALU07 and BADI HRALE00INBOUND_IDOC,I tried so many ways but not able to clear the Job group field data from the idoc.

 

can provide some help.


Thanks,


Attach PDF of form trigger while selecting correspondence type in FB03

$
0
0

Hi friends,

 

I have one complex requirement where in FB03 when selecting a particular correspondence type which was given to us one form get trigger which we can see through f.64 tcode . The user want that the form which get triggered directly attach to  attachment link of FB03 as PDF form.

Can anyone please help me in this case .

 

Thank you in advance.

Automatic Tracking no Enter in PR Through MRP

$
0
0

Dear Experts,

 

I was created  one SO in VA01 And MRP Run against SO .MRP Through run generated PR against SO. In PR how I automatically enter Tracking No(SO No.) 

how to do this please help.

 

 

 

Thanks and regards,

Sam

TAXACCOUNT structure issue in BAPI_ACC_DOC_POST

$
0
0

Hi Experts,

 

I am trying to write a mass upload program to park documents using BAPI_ACC_DOCUMENT_POST.

 

31     960000000(vendor)              1540.00-(ve)

40     406050(G/L)               P1     1400.00+(ve)

40     29500(tax acc)           P1      140 +(Ve)

 

 

From the above posting key 31 , end user will supply gross amount(1540) & tax amount(140)

                        posting key 40 (as per screen shot item 2 & 3 ) end user will supply net amount(1400) & tax code (p1) as single entry.

 

My question is when I am trying to post/park document with the below given structure it actually gives the success message but when see the parked document it looks as below screen shot . As in screen Debit- & Credit are not balanced instead I have no idea how it is getting 1680.00 as Debit?

 

I will be using FM to CALCULATE_TAX_FROM_NET_AMOUNT or CALCULATE_TAX_FROM_GROSS_AMOUNT with taxcode 'P1' as given with posting key 40 abecause for item '003' in screen user is not proving any details it could be worked out with to get GL etc from FM.

 

I have shared my current logic . Please correct my logic of where I am missing any essential field in BAPI structure.

 

Capture.PNG

 

lw_acc_vr-itemno_acc = '0000000001'.

lw_Acc_vr-vendor_no = '0096004547'.

lw_acc_vr-comp_code = '8720'.


lw_curr_amt-itemno_acc = '0000000001'.

lw_curr_amt-currency = 'AUD'.

lw_curr_amt-currency_iso = 'AUD'.

lw_curr_amt-amt_doccur = '-1540.00'


****************************************************************

lw_acc_gl-itemno_acc = '0000000002'.

lw_acc_gl-gl_account = '0000406260'.

lw_acc_gl-item_text = 'tst_value_2'.

lw_acc_gl-doc_type = 'KR'.

lw_acc_gl-comp_code = '8720'.

lw_acc_gl-tax_code = 'P1'.

lw_acc_gl-orderid =   '000008267848'.


lw_curr_amt-itemno_acc = '0000000002'.

lw_curr_amt-currency = 'AUD'.

lw_curr_amt-currency_iso = 'AUD'.

lw_curr_amt-amt_doccur = '1400.00'.

 

*****************************************************************

lw_acc_tax-itemno_acc = '0000000003'.

lw_acc_tax-gl_account = '0000249500'.

lw_acc_tax-tax_code = 'P1'.

lw_acc_tax-tax_rate = '10.000'.


lw_curr_amt-itemno_acc = '0000000003'.

lw_curr_amt-curr_type = '00'.

lw_curr_amt-currency = 'AUD'.

lw_curr_amt-currency_iso = 'AUD'.

lw_curr_amt-amt_doccur = '140.00'.

lw_curr_amt-amt_base = '1400.00'.


*******************************************************************



Calling a REST API with Parameter and Ticket (Token)

$
0
0

Hi Team ,

 

I have a requirement where I have a call a REST API from ABAP along with parameter and ticket .

 

I tried searching on SDN and could not find much information on it .Since I am new to this and doing REST API's for tge first time . I need some guidance like how to pass paramater and ticket while calling the API .

 

I tried some sample codes from SDN and able to call a sample REST API available online but for my requirement I need to pass parameters and tickets which is where I need some help .

 

Thanks for looking .

How to Provide exits and enhancement points in program

$
0
0

Hi,

We are doing product development like add-on product. Can anyone tell me that how can I provide some exits and implicit/explicit enhancement point in our program so that later a developer/customer could enhance it by using that?

 

 

Thanks

Piyush

Viewing all 8332 articles
Browse latest View live


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