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

Multiple POs with comma as input to a RFC(FM) needs to be split and passed to an internal table dynamically

$
0
0

Hi,

 

I have a requirement in an RFC wherein the input is a Custom PO Number(VBKD-BSTKD). The input contains multiple POs seperated by a comma.  I need to split these POs and fetch the invoice details pertaining to each of these POs. But, there could be any number of POs seperated by comma. This input needs to be passed to some internal table or field symbols.   Please note that this is an RFC  and so there is no file upload concept here. Whatever the third party passes as input needs to be broken into multiple POs and fetch the required details. How do I achieve this? Appreciate help in this regard.

 

Thanks,

Pavan


Restrict adding items in VA02

$
0
0

Hi all, I have the following requirement: do not allow the user to add items in VA02 due to certain conditions for some orders...

 

I need to have something like Reason for rejection tab, the user can modify current item but can not add more...

Reason for rejection.jpg

sales.jpg

 

Can that be done by code or by Transaction/Screen Variants?

 

Any suggestion?

 

I'd appreciate any guidance, regards!

how to simulate GL line items using POSTING_INTERFACE_DOCUMENT

$
0
0

Hi Experts - We need urgent help from you if you have come across same/similar issue with Custom Z Program to post Manual Journal Entries.

 

SAP Version: ECC6 - EHP7.

We have a custom Z Program to post Manual Journal Entries by business users which is using by 1000s of users.

Program was developed using CALL FUNCTION "BAPI_ACC_DOCUMENT_CHECK" for simulation and  CALL FUNCTION "POSTING_INTERFACE_DOCUMENT " for posting.  Now issue is some errors are not catching in simulation by CALL FUNCTION "BAPI_ACC_DOCUMENT_CHECK" and failing during Posting,  due to that files are partially posting and partially not posting which is creating a lot of mess and manual work for business users.

And also we don't know why CALL FUNCTION "BAPI_ACC_DOCUMENT_POST" not used in the place of "POSTING_INTERFACE_DOCUMENT" by Implementation Team.


It would be very much appreciated if somebody faced same/similar issue and please help us to fix this issue if you have already fixed it.


Thanks and Regards,

Prathap

Retrieving list of Persistent Objects using Incomplete Business Key

$
0
0

Hello experts,

 

I've recently started developing a project using the Persistent Object Service, and I'm currently struggling on how to Retrieve more than one persistent object at a time, using a incomplete Business Key.

 

For example, let's say we have a Persistent Class for table SFLIGHT ( Using Business Key ). The Business Key for this class, is going to be all the primary key fields from the table  :

  • CARRID
  • CONNID
  • FLDATE

 

That being said, If I want to get a persistent object, I have to specify all 3 fields to the GET_PERSISTENT Method, such as :

 

persistent_object = zca_sflight=>agent->get_persistent(   EXPORTING     i_carrid =    'AA'     i_connid =  '0017'        i_fldate =     '20140917 )

Let's say, I need ALL Persistent Objects from Company AA. How do I achieve that, WITHOUT using any SELECT Statement ?

 

For example:

table_of_persistent_objects = zca_sflight=>agent->get_persistent_table(     EXPORTING          i_carrid = 'AA' )

One of my initial solutions, was implementing method IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_QUERY, and using a FILTER like so :

 

lo_query_manager = cl_os_system=>get_query_manager( ).
lo_query = lo_query_manager->create_query( i_filter = `CARRID = PAR1  ).
 zca_sflight=>agent->if_os_ca_persistency~get_persistent_by_query(     EXPORTING       i_query         = lo_query       i_par1          = 'AA'     RECEIVING       result          = table_of_objects   ).

And that almost worked. The only problem using the method GET_PERSISTENT_BY_QUERY is that it ONLY gets data that is already in the database.

 

So let's say I recently created a persistent object for SFLIGHT, and didn't commit work yet. The object exists in cache, but there is no entry for it in the Database Table, so if I call method GET_PERSISTENT_BY_QUERY, that object would not be returned.

 

I need something that works the same way GET_PERSISTENT does ( Considering objects from CACHE and Database ), but can return lists of objects using incomplete business keys.

 

PS: Methods like GET_PERSISTENT_BY_KEY_TAB won't work, because even though they return a table of objects, they still require a table of complete business keys.

 

Thank you in advance,

Able to execute another Tcode without terminating the first session of the Tcode... Means without /n or /o able to execute another tcode

$
0
0

Able to execute another Tcode without terminating the first session of the Tcode... Means without /n or /o able to execute another tcode.

 

Example:

 

1) Log on

2) executed /nSU01

3) executed PFCG

WBS not copied from header to item

$
0
0

Hi everyone,

 

I have a requirement to copy the WBS element of a sales order in acct assignment data tab from BOM header to line items (when VBAP-UEPOS maintained).

To achieve this I have used the user exit : MV45AFZB -  USEREXIT_FILL_VBAP_FROM_HVBAP and below is my code :

 

LOOP AT xvbap ASSIGNING <fs_xvbap> WHERE uepos IS NOT INITIAL.

   IF <fs_xvbap> IS ASSIGNED.

     READ TABLE xvbap ASSIGNING <fs_xvbap1> WITH KEY posnr = <fs_xvbap>-uepos.

     IF <fs_xvbap1> IS ASSIGNED.

       MOVE <fs_xvbap1>-PS_PSP_PNR TO <fs_xvbap>-PS_PSP_PNR. " WBS element

     ENDIF.

   ENDIF.

ENDLOOP.


However, when a child item is added manually by giving the respective header item (VBAP-UEPOS) the above code doesn't work. Technically, Sometimes the XVBAP doesnot have the UEPOS updated for the recently added item in the above exit. I tried few other exits as well (MV45AFZZ) and the issue is same. To my surprise, when the sales order is saved VBAP has the UEPOS maintained as provided.


Am i missing out something ? Please advise.


Thanks,

Hema

SAP Query-ABAP Code not visible under Record Processing

$
0
0

Hi Experts,

 

I am trying to put some abap code in a custom developed SAP Query.

 

For that I have put the code in infoset under Record Processing.

The Query is working as the code written in infoset.

 

My issue is,  when I go again and check the code under Record Processing, it is not visible.

 

The code under other areas like Initialization, Start of Selection etc are visible.

 

How can I change the code under Record Processing?

 

Thanks & regards,

Shemim

Append Structure in FPLT table

$
0
0

Hi,

 

I'm posting this query after going through various posts on the subject.

We are in 4.7 version and would like to add custom fields to table FPLT, to store additional information.

Since there are no customer includes in FPLT table, we intend to add append structure with our new fields.

Want to know if anyone has done similar enhancement? and if there is any negative impact on billing etc?

 

In some posts the exits RV60FUS1 & RV60FUST has been suggested to use. However,not sure how these can be used to store data in custom fields without modifying FPLT table. Appreciate any suggestion/solution. Thanks


is there any way to restrict the outbound idoc for particular cases?

$
0
0

there is a scenario that an outbound idoc is generated if we create customer thru BP,

 

but there is a case that we can create a customer thru custom RFC and the issue is while creating the customer thru this custom RFC also this outbound idoc is creating which effects the business requirement.

 

so, is there any way to restrict the generating the o/b idoc only for some case or any code or bapi's are there to add in the RFC for not generating the o/b idoc.

 

please tell the solution, correct answers will be rewarded.

How to trigger the warning % of number range

$
0
0

Hi experts,

 

I've created a Z number range z_text,and setted 50% to Warning %.

11.jpg

22.jpg

And then called function NUMBER_GET_NEXT in program,but sy-subrc always equal to 0.

DATA num TYPE n LENGTH 3.
CALL FUNCTION 'NUMBER_GET_NEXT'
  EXPORTING
    nr_range_nr                   = '01'
    object                        = 'Z_TEST'
*   QUANTITY                      = '1'
*   SUBOBJECT                     = ' '
*   TOYEAR                        = '0000'
*   IGNORE_BUFFER                 = ' '
IMPORTING
   number                        = num
*   QUANTITY                      =
*   RETURNCODE                    =
EXCEPTIONS
   interval_not_found            = 1
   number_range_not_intern       = 2
   object_not_found              = 3
   quantity_is_0                 = 4
   quantity_is_not_1             = 5
   interval_overflow             = 6
   buffer_overflow               = 7
   OTHERS                        = 8.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

 

So how to trigger the warning % of number range,and in what form we received the warning % .

 

Best Regards.

Modify Internal Table using other internal table

$
0
0

Hi All,


To give you background on this. I want to check DOI Number (doi_no) from OIU_DO_DI table to check whether that DOI is approved and its not checked out. Once I check this then I need to modify below highlighted (bold) record from internal table lt_oiu_do_do. If you need any further information please let me know.


   SELECT  bukrs vname doi_no doi_appr_cd checked_out_fl

       FROM oiu_do_di

       INTO TABLE lt_oiu_do_di.

                                                                                                                                                                                                                                  SORT lt_oiu_do_di BY bukrs vname.

 

    READ TABLE lt_oiu_do_di INTO wa_oiu_do_di WITH KEY wa_oiu_do_di-bukrs.

   wa_oiu_do_do-doi_no = wa_oiu_do_di-doi_no.

 

    MODIFY lt_oiu_do_do FROM wa_oiu_do_do TRANSPORTING doi_no

    WHERE wa_oiu_do_di-bukrs = lt_oiu_do_do-bukrs AND

          wa_oiu_do_di-vname = lt_oiu_do_do-vname AND

          wa_oiu_do_di-doi_appr_cd = 'X' AND

          NOT wa_oiu_do_di-checked_out_fl = 'X'.

                                                                                                                                                                                                                                                              

    LOOP AT lt_oiu_do_do INTO wa_oiu_do_do.

                                                                                                                                                                                                                                                              

      CLEAR l_gri_pc.

                                                                                                                                                                                                                                                              

      wa_e_t_data-bukrs = wa_oiu_do_do-bukrs.

      wa_e_t_data-vname = wa_oiu_do_do-vname.

      wa_e_t_data-doi_no = wa_oiu_do_do-doi_no.

      wa_e_t_data-cust_vend_cd = wa_oiu_do_do-cust_vend_cd.

 

I am getting Error as "WA_OIU_DO_DO and the line of "LT_OIU_DO_DO" are incompatible."

 

Can someone please help me in writing this code?

 

With Regards,

Sarika

How to read archive database with READ_TEXT FM

$
0
0

Hi Expert,

 

One of user requirements is to read a long text (item level) maintained in a archived SD delivery document, so that I tried to code a ABAP program using READ_TEXT function module. One of import parameters namely 'ARCHIVE_HANDLE' seems to be used to indicate the long text is in archive files.

 

Searched in help, it seems the value of 'ARCHIVE_HANDLE' is obtained from another FM 'ARCHIVE_OPEN_FOR_READ'. Unfortunately, the READ_TEXT still does not work.

 

Could someone can tell me what is wrong in my program? Many thanks.

 

BR,

Eddy

Problem in Smartforms output ..

$
0
0

Hi Experts,

 

Please check the screen shots and help me with solving the issue .

Capture1.JPG

Capture2.JPG

 

The problem is some part of the data it is showing in 1st page and the rest in 2nd page ,this problem is in all the next pages in my form .

And because of this problem when I am calculating the Sub total it is adding the value in 1st page but showing it in 2nd page.

kindly help me with a solution to this.

 

 

 

Thanks in Adv,

Abhisek

What is the differences between repository and development object?

$
0
0

I read this off ABAP Objects ABAP Programming in SAP NetWeaver from SAP Press.

 

The Object Navigator is a development environment for the central editing of development objects, which are any objects that can be edited with the ABAP Workbench tools. We call these objects repository objects. This includes all ABAP programs of AS ABAP and all their components. However, there are many other repository objects, such as global data definitions in the ABAP Dictionary, or XSLT programs. Together, these development objects in the ABAP Workbench form a so-called repository.

 

It seemed that the term development objects and repository objects refers to the same thing. Does anyone can explain to me the differences to these 2 terminology?

VA03 - Tables/FM or logic for fetch sales order item amount value

$
0
0

Hi All,

 

I have a requirement that I need to get Sales order item  amount (KBETR) along with items ,

 

I had gone through SDN and all.

 

The logic which I have is :

 

From VBAK table I have to get KNMUV value based on sales order .

 

From Cond. table KONV , I can  get All the Conditions items from KONV table .

 

Here I need get Item Amount value .

 

test1.png

 

Please suggest ,

 

Lokeswar Reddy Byni.


Arabic Text in SAP Script

$
0
0

Hi Experts,

 

I am having an issue in printing Arabic text, While printing check receipt, Arabic text is not printing its displaying as mirror(RTL) in print preview

Eg: company code description or cash journal description need to be displayed in arabic,

 

I have tried SAP notes it says but this sap notes says it cannot be implemented

0822634 RTL SAPScript/Smartforms printing with embedded LTR texts

1258722 LTR Includes in RTL SAPScript/Smartforms documents

 

Fact : Login Lang - English , Script language English

 

Please provide some input,

 

Thanks,

Ahmed.

DELETE ZDTTABLE IS NOT WORKING

$
0
0

Hi all, I'm a junior developer and I'm having troubles trying to delete a zdttable. I'm using my code inside a Web Dynpro. When I call delete sentence for first time it doesn´t work, but when I try again it works fine. I don´t know really why can this be happening. Can someone help me please??. Thanks.

 

Bellow my code:

 

loop at lt_rms_documents into ls_rms_documents.

 

         if ( ls_rms_documents-object_type eq 'BUS2201' ) or ( ls_rms_documents-object_type eq 'BUS2000113' ).

 

           clear:ls_ztb_ahorro_saving.

 

             select *

               from ztb_ahorro_save

                into ls_ztb_ahorro_saving

                 where guid_expediente ls_expediente-guid_expediente and

                       cod_expediente  ls_expediente-cod_expediente  and

                       object_id       ls_rms_documents-object_id .

              endselect.

 

 

             delete from ztb_ahorro_save where guid_expediente = ls_ztb_ahorro_saving-guid_expediente

                                         and object_id eq ls_ztb_ahorro_saving-object_id.

 

*            DELETE ztb_ahorro_save FROM ls_ztb_ahorro_saving.

 

             commit work.

             wait up to 3 seconds.

Im getting unknown data error for SLIS_selfield ??

$
0
0

Im trying to do an interactive alv report using ucomm and slis_selfield. even though I added statement "TYPE-POOLS: SLIS." in the program, I am getting an error. Please see the attachment for error and the code on which error pops up.

 

The error is that 'SLIS_SELFIED is unknown data or table as its not defined' But it must be a global variable, right?

custom table with only one entry and without any primary keys

$
0
0

Hello Guys

 

I have a requirement where I need to create a custom table without any primary keys and it can have only one entry in database at max.

It mean the user should not be able to insert new row but can modify only the existing row. The fields should be character type with a size of 1000 characters.

 

I created table with 4-5 fields of char predefined type with length 1000 characters but when I try to maintain in SM30 I do not get any fields for input.

Even I do not see the table fields in the table maintainence generator (modification screen).

 

Could you please help.. Is this requirement not possible? I also need help in creating event for table to have only one entry.

 

Thanks in advance.

Convert ALV display into EXCEL and send out as attachment automatically

$
0
0

Hi,

 

There are some similar posting but none of them looks complete.

I had a ALV display.

Data had been store in an internal table.

 

Can you some tell me what steps do I need to take?

 

a. Convert ALV table into object table.

b. Call a FM to send out as a mail with an excel attachment

 

 

Thanks

Bye

Viewing all 8332 articles
Browse latest View live


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