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

Problem with System call C_DIR_READ_START

$
0
0

Hello to all,

 

I've been tasked with debugging some code that uses calls to C_DIR_READ_START, NEXT and finish system calls to get a list of files in a specific app server path. The problem is this part of the program is only working randomly. Sometimes I run it and it gets the file list, sometimes i run it and it doesnt.

 

Does somebody know what can cause this random behavior?

 

 

Thanks in advance.


suim users by complex selection criteria

$
0
0

Dear All,

 

I want to develop new custom report like suim users by complex selection criteria.Can anyone tell me the FM or BAPI to get output same like SUIM.

 

 

 

Thanks & Regards,

Kumaran Duraiswamy.

Creating new transaction calling GR55: skip first screen doesn't work

$
0
0

Good morning everyone,

 

I hope this is the right area to discuss about my problem:

 

I've created a new report using report painter and now I'm trying to create a new transaction to execute it.

 

From SE93 I've selected the transaction GR55 and flagged the "Skip first screen" checkbox, compiled the instruction with the name of my group at the bottom and then saved.

 

Unfortunately, the "skip first screen" doesn't seem to work because I always see the first screen and I have to manually execute the report with F8.

 

Any idea about this?

 

Thank you all.

Netweaver 7.0x trials download links are broken

$
0
0

Hello,

 

the download links for all of the Netweaver trials are broken and giving this error when I request them. 

 

An error occurred while processing your request.

Reference #50.27cc94d1.1457034427.15812d78

 

An error occurred while processing your request.

Reference #50.27cc94d1.1457034428.15812f9a

 

These errors are coming up for all of the different versions of 7.0 series.

 

Sincerely,

 

Gabriel

BAPI for Add new Line item in Sales order,Reference with contract

$
0
0

Dear Folks,

 

 

I need to add new line item in Sales order, Reference with contract.

 

 

Suppose the Contract quantity is 800, 

 

The sale order is created with this contract reference, The sale order quantity is 200.

 

If I want to add new line item in the same SO, It will consider remaining contract quantity(800-200=600) and the new line item quantity should be 600.

 

 

Please help me how can I achieve this.

 

 

Thanks,

Linga

customer exit for tcode FI02

$
0
0

Hi All,

 

In tcode FI02, after entering all the data I click on SAVE. If the SWIFT code field is blank then it should throw an error message.

 

I created a project for Enhancement "SAPLBANK" and activated. But, while saving it is not stopping at the break point.

 

This is a 4.0B version of SAP. In ECC, we can acheive this in configuration setting.

 

Anyone have idea of correct EXIT name to acheive this functionality.

 

Thanks,

Haritha

CL_DM_XDC_PRINT_JOB

$
0
0

Hi

I want  to print all kinds of files from ixos  archive

 

For that I want to use class   CL_DM_XDC_PRINT_JOB

Can anyone send me  code  for this class

 

Thanks

Shlomit 

BDC for F-03

$
0
0

if anyone have coding for F-03 clear GL account pls assist...thanks in advance..


How to Reset a Rejected Purchase Order ?

$
0
0

Hi All,

 

 

I want to reset a rejected purchase order ( undo rejection action ). I can reject a purchase order, but i can't reset the rejected purchase order.

 

I'm using that code, it's not working. How can i reset to a rejected purchase order ? Need help about that.

 

 

Thanks.

 

SELECT SINGLE * FROM ekko WHERE ebeln    EQ gt_itab-ebeln
                                     AND procstat EQ '08'.
         IF sy-subrc EQ 0.

*  prepare creation of PO instance
           ls_document-doc_type    = 'F'.
           ls_document-process     = mmpur_po_process.
           ls_document-trtyp       = 'V'.
           ls_document-doc_key(10) = gt_itab-ebeln.
           ls_document-initiator-initiator = mmpur_initiator_rel.

*  object creation and initialization
           lv_ebeln = gt_itab-ebeln.
           CREATE OBJECT lc_po.
           lc_po->for_bapi = mmpur_yes.
           CALL METHOD lc_po->po_initialize( im_document = ls_document ).
           CALL METHOD lc_po->set_po_number( im_po_number = lv_ebeln ).
           CALL METHOD lc_po->set_state( cl_po_header_handle_mm=>c_available ).

*  read purchase order from database
           CALL METHOD lc_po->po_read
             EXPORTING
               im_tcode     = 'ME29N'
               im_trtyp     = ls_document-trtyp
               im_aktyp     = ls_document-trtyp
               im_po_number = lv_ebeln
               im_document  = ls_document.

           IF lc_po->if_releasable_mm~is_rejection_allowed( ) = 'X'.
             CALL METHOD lc_po->if_releasable_mm~reject
               EXPORTING
                 im_reset = space
               EXCEPTIONS
                 failed   = 1
                 OTHERS   = 2.
           ENDIF.

           CALL METHOD lc_po->po_post
             EXCEPTIONS
               failure = 1
               OTHERS  = 2.

           WAIT UP TO 1 SECONDS.

         ENDIF.

         SELECT SINGLE * FROM ekko WHERE ebeln    EQ gt_itab-ebeln
                                     AND procstat <> '08'.
         IF sy-subrc EQ 0.

           it_message-ebeln = gt_itab-ebeln.
           it_message-msgtype = 'S'.
           it_message-message = text-017.

           APPEND it_message.

Radio Button Block Not Appearing In Selection Screen When We Select Variant

$
0
0

Hi ABAPers,

 

i have a requirement as follows,

 

in selection screen initially i should display Country Key And Company Code. Based up on that entries Radio Button Selection Block And File Path Selection Block should appear.

 

I have done coding for this and working as expected.

 

But the problem is, when am saving as variant with input fields for background job. When am selecting variant in selection screen. Except radio button group block remaining blocks appear with saved input data. When am press enter key then only radio button selection block appears.

 

PLease help me on this, when am clicking variant in selection screen it shoul display all blocks including radio button group block.

 

THank you,

RIshi

OO ALV Grid gets initialized

$
0
0

I got a very weird problem. I am doing OO ALV. In my PBO I am creating container and grid(both are declared public).

pic1.jpg

I am creating event receiver and setting handle_user_command as usual:

pic2.jpg

pic3.jpg

The first display of the grid is fine. Then I am selecting a line on the grid and click custom defined button   to go to method HANDLE_USER_COMMAND. When I put a break in the method HANDLE_USER_COMMAND in debug mode, my grid MR_GRID_CPPK is initial. Needless to say, my attempt to get selected rows gets blown off.

pic4.jpg

Any Idea why my grid MR_GRID_CPPK gets initialized? I swear I don't do it manually in the code.


The effort to help will be properly awarded with points

File Path Should Change Based On Radio Buttons

$
0
0

HI Experts,

 

I have requirement as follows,

 

i should write two selection blocks for two different countries related radio buttons. Intially selection screen shows as country key and company code.

ex: if i can give country key as US and company code as 1010. US releated radio buttons should appear and file path also displays depends upon radio button.

 

I have done coding for that, i put first radio button as default. So am getting path name as first radio button of US. Till here fine.

 

 

but when am entering country key as JP and JP related company code. Path will gives same as US first radio button path which i put as default.

 

if I can't put as default radio button. Initially selection screen iam not getting any path that's why i put default radio button.

 

so how can i over come this, if i put country key as JP i should get path first radio button of JP.

 

am maintaining paths in FILE tcode instead of hardcode.

 

so how path will be clear and should appear JP radio button related path

 

THank You

KApil

Development instances - ECC/BI/PI/HANA/IS Retail/S4 HANA

$
0
0

Dear SAP Colleagues,

 

We are a boutique SAP development firm creating bolt-on applications for our clients. As part of the process, we are looking to purchase development licenses (3-5 users) for the core ECC 6.0, BI 7.0, PI(PO), IS Retail and the latest S4 HANA Simple Logistics and Simple Finance systems. I searched extensively on SCN and found various posts around free developers license and CAL but could not find a clear answer about how to get dedicated instances and development licenses. Many of the posts were from past and does not seem relevant for e.g SAP Developer Center Master Software Developer License Agreement (This link talks about free developer license without the actual business suite as part of the system). We are open to a subscription model (dedicated instances) or on-premise systems as well.

 

Need your guidance in approaching the correct contact person in SCN or SAP to get this setup or the current blog/post which can point us to the relevant place. Your help and any pointers would be much appreciated!!

 

Thank you for taking the time.

 

Best Regards

Ganesh Agarwal

Displaying HTML page in ABAP using Container in Modulepool

$
0
0

Hi SDN's,

 

i have the HTML code for displaying text field with readonly property , this HTML page i want to display in my ABAP Modulepool program using containers....

 

 

is it possible ,if possible how?, please help me......

 

 

 

Regards,

Suba

Transport Timing

$
0
0

Hi All,

 

I'm trying to find information on whether general guidelines or official documentation for transport timing.  I do a lot of abap development and am often running into situations where I'm wondering if a change can go through during working hours or if it will cause an issue when moving to production.  It seems as though it's learned through experience and searching scn and google has gotten me a lot of broken links on training documentation or simple tutorials on how to create a transport.

 

If anyone can point me in the right direction I'd appreciate it.

-Chris


Attach File to Services to Object in VA03 (GOS) from Program

$
0
0

Hello All,

 

I am trying to upload an attachment to services to Object (GOS) in VA03 from custom program. I can see the attachment added in the attachment list but when i try to open it I get below error.

error.PNG

 

below is the program written.

FUNCTION z_dbill_create_attach.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     REFERENCE(IM_VBELN) TYPE  VBELN

*"     REFERENCE(IM_PATH) TYPE  LOCALFILE OPTIONAL

*"     REFERENCE(IM_FNAME) TYPE  STRING

*"     REFERENCE(IM_XSTRING) TYPE  FPCONTENT

*"----------------------------------------------------------------------

   DATA :         ls_fol_id     TYPE soodk,

                  ls_obj_id     TYPE soodk,

                  ls_obj_data   TYPE sood1,

                  ls_objhead    TYPE soli,

                  lv_key        TYPE swo_typeid,

                  lv_type       TYPE swo_objtyp,

                  ls_object     TYPE borident,

                  ls_folmem_k   TYPE sofmk,

                  lv_ep_note    TYPE borident-objkey,

                  ls_note       TYPE borident,

                  lv_name       TYPE string,

                  lv_extension  TYPE string,

                  lv_offset     TYPE i,

                  lv_size       TYPE i,

                  lv_temp_len   TYPE i,

                  lv_offset_old TYPE i.

 

   DATA: lt_doc_content TYPE solix_tab,

         lt_cont        TYPE soli_tab,

         lt_objhead     TYPE STANDARD TABLE OF soli.

 

*-----Folder Root

   CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'

     EXPORTING

*     OWNER                 = ' '

       region                = 'B'

     IMPORTING

       folder_id             = ls_fol_id

     EXCEPTIONS

       communication_failure = 1

       owner_not_exist       = 2

       system_failure        = 3

       x_error               = 4

       OTHERS                = 5.

 

 

   CHECK sy-subrc = 0.

 

   CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

     EXPORTING

       buffer          = im_xstring

       append_to_table = c_x

     TABLES

       binary_tab      = lt_doc_content.

 

   CALL FUNCTION 'SO_SOLIXTAB_TO_SOLITAB'

     EXPORTING

       ip_solixtab = lt_doc_content

     IMPORTING

       ep_solitab  = lt_cont.

 

   SPLIT im_fname AT '.' INTO lv_name lv_extension.

   TRANSLATE lv_extension TO UPPER CASE .

 

   ls_obj_data-objsns    = 'O'.

   ls_obj_data-objla     = sy-langu.

   ls_obj_data-objdes    = lv_name .

   ls_obj_data-file_ext  = lv_extension.

 

   ls_obj_data-objlen    = lines( lt_doc_content ) * 255.

*  ls_obj_data-objlen  = xstrlen( im_xstring ).

 

   CONCATENATE '&SO_FILENAME=' lv_name '.' lv_extension INTO ls_objhead-line.

   APPEND ls_objhead TO lt_objhead.

 

   ls_objhead-line = '&SO_FORMAT=BIN'.

   APPEND ls_objhead TO lt_objhead.

 

 

   CALL FUNCTION 'SO_OBJECT_INSERT'

     EXPORTING

       folder_id             = ls_fol_id

       object_type           = 'EXT'

       object_hd_change      = ls_obj_data

     IMPORTING

       object_id             = ls_obj_id

     TABLES

       objhead               = lt_objhead

       objcont               = lt_cont

     EXCEPTIONS

       active_user_not_exist = 35

       folder_not_exist      = 6

       object_type_not_exist = 17

       owner_not_exist       = 22

       parameter_error       = 23

       OTHERS                = 1000.

 

   IF sy-subrc EQ 0 .

 

* attach document as GOS attacment to realted bussiness object

     ls_object-objkey  = im_vbeln.

     ls_object-objtype = 'BUS2096'.

 

     ls_folmem_k-foltp = ls_fol_id-objtp.

     ls_folmem_k-folyr = ls_fol_id-objyr.

     ls_folmem_k-folno = ls_fol_id-objno.

     ls_folmem_k-doctp = ls_obj_id-objtp.

     ls_folmem_k-docyr = ls_obj_id-objyr.

     ls_folmem_k-docno = ls_obj_id-objno.

 

     lv_ep_note        = ls_folmem_k.

     ls_note-objtype   = 'MESSAGE'.

     ls_note-objkey    = lv_ep_note.

 

     CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'

       EXPORTING

         obj_rolea    = ls_object

         obj_roleb    = ls_note

         relationtype = 'ATTA'

       EXCEPTIONS

         OTHERS       = 1.

     IF sy-subrc = 0.

 

       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

         EXPORTING

           wait = c_x.

 

       COMMIT WORK.

       WAIT UP TO 10 SECONDS.

     ENDIF.

   ENDIF.

 

ENDFUNCTION.



Please suggest where I am going wrong.


Regards

Ujwal

How to Validate data in LSMW?

$
0
0

Hi Experts,

 

I got one requirement in LSMW. i need to validate text file data with database level table data.

 

information for my req:-

i'm using custom table.

text file contains lakhs of records. so i need to avoid select statement with in the records to fetch.

 

 

some more doubts.

1. How to assign TR to LSMW.

2. How to download/Upload LSMW..

3. How to provide selection screen in LSMW for file path in LSMW to above requirements, if it's possible where can i write this code?

 

Regards

Shankar B

Return Messages after PRELIMINARY_POSTING_FB01

$
0
0

Hi,

 

I am using ' PRELIMINARY_POSTING_FB01' for parking a document, but this does'nt return the return messages either error /success, so I used the code as below

 


CALL FUNCTION'PRELIMINARY_POSTING_FB01'IN BACKGROUND TASK
              EXPORTING
                i_tcode           = l_tcode
                i_tcode_int       = l_i_tcode
               TABLES
                 t_bkpf           = i_bkpf[]
                 t_bseg           = i_bseg[]
                 t_bsec           = i_bsec[]
                 t_bset           = i_bset[]
                 t_bsez           = i_bsez[] 

 

if sy-subrc = 0.


MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO x_return_suc_msg-message.

*              APPEND x_return_suc_msg TO i_return_suc_msg.

endif.

 

But this throws an error saying Message is of type 'A' 'E' 'I' 'W' 'X'.

 

Please let me know how to get the messages returned here.

 

Regards,

Mohammed


Items with same GL account got fused using BAPI_ACC_DOCUMENT_POST

$
0
0

Hi Experts,

 

We are encountering an issue when posting via BAPI_ACC_DOCUMENT_POST. We have 4 items with the same GL account.

parameters.png  parameters2.png

 

But after posting, the items got fused. See below results from BAPI and manual posting below. What could be the cause of the issue here?

results.png

We want to have the same result as manual posting. I would really need some help on this.

 

 

Thanks,

Trixa

heading of smartform changes in quality server

$
0
0

hi experts,

i developed a smartform in development server its working fine, but after released in quality server heading of smartform has been changes,

heading is moved to the right corner but in development it is in the middle.

 

 

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>