Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create services po with bapi_po_create1 dump

0 Likes
2,461

Hello everyone,

    I came across a problem with bapi_pi_create1 when i create services po. When i create a po with less than 10 items, the po was created successfully, but when the po has more than 11 items, it raise a dump TSV_TNEW_BLOCKS_NO_ROLL_MEMORY. I've already connected with basis to extend some parameters like ztta/roll_area, ztta/roo_extension, but it had no use.

    Tomorrow i will give you the code and dump,

Hello everyone,

    I came across a problem with bapi_pi_create1 when i create services po. When i create a po with less than 10 items, the po was created successfully, but when the po has more than 11 items, it raise a dump TSV_TNEW_BLOCKS_NO_ROLL_MEMORY. I've already connected with basis to extend some parameters like ztta/roll_area, ztta/roo_extension, but it had no use.

    Tomorrow i will give you the code and dump,

8 REPLIES 8
Read only

Former Member
0 Likes
2,189

Hi Steven,

Did you check the note http://service.sap.com/sap/support/notes/1578916


As per this you may need to ask your Basis team to extend rdisp/ROLL_MAXFS.


It is also recommended to increase your abap/heap_area_dia, abap/heap_area_nondia and ztta/roll_extension to at least 4GB. The abap/heap_area_total should be total of abap/heap_area_dia + abap/heap_area_nondia


Also there is another note for parameter recommendation.


http://service.sap.com/sap/support/notes/146289


R



Read only

0 Likes
2,189

Thank you, Rudra, but basis had alread extend temporary memory space, but it had no use. I hope you can have a look at my code, and find whether the parameters has a wrong way data or i made a discorect way to give values to them.

Read only

0 Likes
2,189

Hi Steven,

This type of problem happens when internal table becomes too big. I wonder which internal table is the culprit here. I can see you have correctly refreshing the internal tables after the BAPI call.

Can you please attach the entire short dump ?

R

Read only

0 Likes
2,189

Also check this part.

Incase you don't have any error then only you are Refreshing all the internal tables. Why? The Internal tables should be refreshed irrespective of if the BAPI call is successfull or Error.

IF lw_flg IS INITIAL.

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

       EXPORTING

         wait = 'X'.

     CLEAR:lw_flg,l_aufpl,l_aplzl.

     CLEAR:

     wa_header,

     wa_headerx,

     wa_return,

     wa_poitem,

     wa_poitemx,

     wa_services,

     wa_srvacc,

     wa_account,

             wa_accountx.

     REFRESH:

     it_return,

     it_poitem,

     it_poitemx,

     it_services,

     it_srvacc,

     it_account,

     it_accountx.

Read only

roopashree_v2
Explorer
0 Likes
2,189

Hi Steven,

This is due to memory issue.

Ask the BASIS team to increase the temporary memory space, buffer area.

parameter rdisp/ROLL_MAXFS need to be extended.

Also try the OSS note 1578916 which specifies the parameters that need to be extended as well as the storage space.

You have to make sure you have  sufficient disk space to increase the memory and extend the parameters.

Regards,

Roopa

Read only

0 Likes
2,189

My colleague said the services items were wrong, have you got any ideas?

Read only

0 Likes
2,189

the information in the dump:

Short Text

No roll storage space of length 1503272 available for internal storage. 

Try to find out (using specific data selection for example) whether the                      
    transaction will run with less main memory.                                                  
   
    If the problem is due to a temporary bottleneck, run the transaction                         
    again.                                                                                       
   
    If the error persists, ask your system administrator to check the                            
    following profile parameters:                                                                
   
    o  ztta/roll_area            (1.000.000 - 15.000.000) classic roll area                      
    per user and internal session o  ztta/roll_extension       (10.000.000                       
    - 500.000.000) available memory/user in extended memory                                      
    EM  o  ztta/max_memreq_MB maximum size of an individual memory request                       
    (in MB) o  abap/heap_area_total         (100.000.000 - 1.500.000.000)                        
    available memory (malloc) for all users of an application server. If                         
    several background processes are running on one server, temporary                            
    bottlenecks can occur. Of course, the amount of memory (in bytes) must                       
    also be available on the machine (main memory or file system swap).                          
    Caution:                                                                                     
    The operating system must be set up so that there is also enough memory                      
    for each process. Usually, the maximum address space is too small.                           
    Ask your hardware manufacturer or your competence center about this.                         
   
    o  abap/heap_area_dia:          (10.000.000 - 1.000.000.000)                                 
    restriction of the memory that can be allocated to the heap with malloc                      
    per dialog process.                                                                          
   
    Parameter for background processes:                                                          
   
    o  abap/heap_area_nondia:       (10.000.000 - 1.000.000.000)                                 
    restriction of the memory that can be allocated to the heap with malloc                      
    per background process.                                                                      
   
    Other memory-relevant parameters are:                                                        
   
    o  em/initial_size_MB:          (35 - 1200)                                                  
    Extended memory area from which all users of an application server can                       
    meet their memory needs.                                                                     
   
    o  abap/shared_objects_size_MB:                                                              
    Size of the shared memory area that can be used to save shared objects                       
    area instances. This memory area is global for all users of the                              
    application server.                                                                          
    Note which actions and entries caused the error to occur.                                    
   
    Consult your SAP administrator.                                                              
   
    Using transaction ST22 for ABAP dump analysis, you can view, manage,                         
    and retain termination messages for longer periods. 
Read only

0 Likes
2,189

data:

it_poitem        type standard table of bapimepoitem,

it_poitemx       type standard table of bapimepoitemx,

it_return        type standard table of bapiret2,

it_services       type standard table of bapiesllc,

it_srvacc        type standard table of bapiesklc,

it_account       type standard table of bapimepoaccount,

it_accountx      type standard table of bapimepoaccountx,

wa_header        type bapimepoheader,

wa_headerx       type bapimepoheaderx,

wa_poitem        type bapimepoitem,

wa_poitemx       type bapimepoitemx,

wa_return        type bapiret2,

wa_services      type bapiesllc,

wa_srvacc        type bapiesklc,

wa_account       type bapimepoaccount,

wa_accountx      type bapimepoaccountx,

ws_po            type bapimepoheader-po_number.

data:

it_eslh          type table of eslh,

wa_eslh          type eslh,

it_esll          type table of esll,

wa_esll          type esll.

data:

lw_errmsg type string,

lw_ebelp type ebelp,

lw_flg    type c,

l_aufpl type CO_AUFPL,

l_aplzl type CIM_COUNT.

sort it_display[] by ebeln.

sort it_data[] by ebeln.

delete adjacent duplicates from it_display comparing ebeln.

  loop at it_display into wa_display.

clear:lw_flg,l_aufpl,l_aplzl.

clear:

wa_header,

wa_headerx,

wa_return,

wa_poitem,

wa_poitemx,

wa_services,

wa_srvacc,

wa_account,

wa_accountx.

refresh:

it_return,

it_poitem,

it_poitemx,

it_services,

it_srvacc,

it_account,

it_accountx.

*header

wa_header-comp_code = wa_display-bukrs.

wa_header-doc_type = wa_display-bsart.

    wa_header-vendor = wa_display-lifnr.

wa_header-purch_org = wa_display-ekorg.

wa_header-pur_group = wa_display-ekgrp.

wa_header-currency = 'XXX'.

wa_header-pmnttrms = wa_display-zterm.

wa_headerx-po_number = 'X'.

wa_headerx-comp_code = 'X'.

wa_headerx-doc_type = 'X'.

wa_headerx-vendor = 'X'.

wa_headerx-purch_org = 'X'.

wa_headerx-pur_group = 'X'.

wa_headerx-currency = 'X'.

wa_headerx-pmnttrms = 'X'.

* items

clear lw_ebelp.

sort it_data by ebeln.

loop at it_data into wa_data where ebeln = wa_display-ebeln.

refresh:

it_eslh,

it_esll.

clear:

wa_eslh,

wa_esll.

if wa_data-banfn is not initial.

select *

into corresponding fields of table it_eslh

from eslh

where ebeln = wa_data-banfn

and bstyp = 'B'.

sort it_eslh by packno ascending.

select *

into corresponding fields of table it_esll

from esll

inner join eslh on esll~packno = eslh~packno

for all entries in it_eslh

where esll~packno = it_eslh-packno.

sort it_esll by packno ascending.

endif.

lw_ebelp = lw_ebelp + 10.

read table it_eslh into wa_eslh index 1.

if wa_eslh is initial.

wa_eslh-packno = wa_data-packno.

endif.

wa_poitem-po_item = lw_ebelp.

wa_poitem-short_text = wa_data-txz01.

wa_poitem-plant = wa_data-werks.

wa_poitem-matl_group = wa_data-matkl.

wa_poitem-item_cat = wa_data-pstyp.

wa_poitem-acctasscat = wa_data-knttp.

wa_poitem-quantity = wa_data-menge.

wa_poitem-net_price = wa_data-zzj.

wa_poitem-tax_code = wa_data-mwskz.

wa_poitem-vend_mat = wa_data-idnlf.

if wa_data-banfn is not initial.

wa_poitem-preq_no = wa_data-banfn.

wa_poitem-preq_item = wa_data-bnfpo.

endif.

wa_poitem-pckg_no = wa_eslh-packno.

append wa_poitem to it_poitem.

wa_poitemx-po_item = lw_ebelp.

wa_poitemx-po_itemx = 'X'.

wa_poitemx-short_text = 'X'.

wa_poitemx-plant = 'X'.

wa_poitemx-matl_group = 'X'.

wa_poitemx-item_cat = 'X'.

wa_poitemx-acctasscat = 'X'.

wa_poitemx-quantity = 'X'.

wa_poitemx-net_price = 'X'.

wa_poitemx-tax_code = 'X'.

wa_poitemx-vend_mat = 'X'.

if wa_data-banfn is not initial.

wa_poitemx-preq_no = 'X'.

wa_poitemx-preq_item = 'X'.

endif.

wa_poitemx-pckg_no = 'X'.

append wa_poitemx to it_poitemx.

wa_account-po_item  = lw_ebelp.

wa_account-serial_no  = 01.

if wa_data-banfn is not initial.

select single SAKTO NPLNR AUFPL APLZL

into (wa_account-gl_account,wa_account-network,l_aufpl,l_aplzl)

from ebkn

where banfn =  wa_data-banfn and  bnfpo = wa_data-bnfpo.

select single VORNR into wa_account-activity

from afvc

where aufpl = l_aufpl and aplzl = l_aplzl.

else.

wa_account-gl_account = wa_data-sakto.

wa_account-network  = wa_data-nplnr.

wa_account-activity  = wa_data-vornr.

endif.

append wa_account to it_account.

wa_accountx-po_item  = lw_ebelp.

wa_accountx-serial_no  = 01.

wa_accountx-po_itemx  = 'X'.

     wa_accountx-serial_nox  = 'X'.

wa_accountx-gl_account  = 'X'.

wa_accountx-network  = 'X'.

wa_accountx-activity  = 'X'.

append wa_accountx to it_accountx.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input  = wa_eslh-packno

importing

output = wa_eslh-packno.

wa_services-pckg_no = wa_eslh-packno.

wa_services-line_no = '0000000001'.

wa_services-outl_level = 0.

wa_services-outl_ind = 'X'.

clear wa_eslh.

read table it_eslh into wa_eslh index 2.

read table it_esll into wa_esll with key packno = wa_eslh-packno.

if wa_eslh is initial.

wa_eslh-packno = wa_data-sub_packno.

wa_esll-srvpos = wa_data-srvpos.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input  = wa_esll-srvpos

importing

output = wa_esll-srvpos.

wa_esll-meins = wa_data-meins.

endif.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input  = wa_eslh-packno

importing

output = wa_eslh-packno.

wa_services-subpckg_no = wa_eslh-packno.

append wa_services to it_services.

wa_services-pckg_no = wa_eslh-packno.

wa_services-line_no = '0000000002'.

wa_services-ext_line = '0000000010'.

wa_services-outl_level = 0.

wa_services-service = wa_esll-srvpos.

wa_services-quantity = 1.

wa_services-base_uom = wa_esll-meins.

wa_services-gr_price = wa_data-zzj.

wa_services-short_text = wa_data-txz01.

wa_services-pln_pckg = '0000000000'.

wa_services-pln_line = '0000000000'.

append wa_services to it_services.

clear wa_srvacc.

wa_srvacc-pckg_no = wa_eslh-packno.

wa_srvacc-line_no = '0000000002'.

wa_srvacc-serno_line = '01'.

wa_srvacc-percentage = 100.

wa_srvacc-serial_no = '01'.

append wa_srvacc to it_srvacc.

endloop.

call function 'BAPI_PO_CREATE1'

exporting

poheader                      = wa_header

poheaderx                     = wa_headerx

importing

exppurchaseorder              = ws_po

tables

return                        = it_return

poitem                        = it_poitem

poitemx                       = it_poitemx

poservices                    = it_services

posrvaccessvalues             = it_srvacc

poaccount                     = it_account

poaccountx                    = it_accountx

   .

loop at it_return into wa_return where type = 'E' or type = 'A'.

clear lw_errmsg.

lw_errmsg = wa_return-message.

concatenate wa_display-check '|' lw_errmsg into wa_display-check.

lw_flg = 'X'.

endloop.

if lw_flg is initial.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

clear:lw_flg,l_aufpl,l_aplzl.

clear:

wa_header,

wa_headerx,

wa_return,

wa_poitem,

wa_poitemx,

wa_services,

wa_srvacc,

wa_account,

wa_accountx.

refresh:

it_return,

it_poitem,

it_poitemx,

it_services,

it_srvacc,

it_account,

it_accountx.

perform change_service_item using ws_po.

update ekko

set zhtbh = wa_data-zhtbh

             zzcglx = wa_data-zzcglx

             zqgdh = wa_data-zqgdh

             zxsht = wa_data-zxsht

where ebeln = ws_po.

if sy-subrc = 0.

commit work.

endif.

wa_display-statu = gre.

wa_display-ebel2 = ws_po.

wa_display-check = 'Success!'.

* message ws_po type 'S'.

else.

wa_display-statu = red.

endif.

modify it_display from wa_display transporting check ebel2 statu.

endloop.